#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc129_a

p, q, r = map(int, input().strip().split())

res = 0
if p < q:
    if q < r:
        res = p + q
    else:
        res = p + r
else:
    if p < r:
        res = p + q
    else:
        res = q + r
print(res) p, q, r = map(int, input().strip().split()) p map(int, input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split q r res = 0 res 0 if p < q:
    if q < r:
        res = p + q
    else:
        res = p + r
else:
    if p < r:
        res = p + q
    else:
        res = q + r p < q p q if q < r:
        res = p + q
    else:
        res = p + r q < r q r res = p + q res p + q p q res = p + r res p + r p r if p < r:
        res = p + q
    else:
        res = q + r p < r p r res = p + q res p + q p q res = q + r res q + r q r print(res) print res r = map(int, input().strip().split()) map(int, input().strip().split()) r res = p + q p + q res q, r = map(int, input().strip().split()) map(int, input().strip().split()) q res = q + r q + r res p, q, r = map(int, input().strip().split()) map(int, input().strip().split()) p res = p + r p + r res res = p + q p + q res res = 0 0 res
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc129_a

p, q, r = map(int, input().strip().split())

res = 0
if p < q:
    if q < r:
        res = p + q
    else:
        res = p + r
else:
    if p < r:
        res = p + q
    else:
        res = q + r
print(res)
