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

print((sum(p)-max(p)))
p,q,r=list(map(int,input().split()))

print((p+q+r-max(p,q,r)))
p = list(map(int, input().split()))
print((sum(p) - max(p)))

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

-p = list(map(int, input().split())) -print((sum(p) - max(p))) +p, q, r = list(map(int, input().split())) +print((p + q + r - max(p, q, r)))