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

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

print(p + q + r - max([p, q, r]))
