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

print((min(p+q, q+r, p+r)))

import itertools

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

ans = 10**18

for v in itertools.permutations([p, q, r], 2):

    ans = min(ans, sum(v))

print(ans)

p, q, r = list(map(int, input().split()))
print((min(p + q, q + r, p + r)))

import itertools

p, q, r = list(map(int, input().split()))
ans = 10**18
for v in itertools.permutations([p, q, r], 2):
    ans = min(ans, sum(v))
print(ans)

+import itertools + -print((min(p + q, q + r, p + r))) +ans = 10**18 +for v in itertools.permutations([p, q, r], 2): +    ans = min(ans, sum(v)) +print(ans)