p, q, r = map(int, input().split())
arr = [p,q,r]
arr.sort()
print(arr[0] + arr[1]) p, q, r = map(int, input().split()) p map(int, input().split()) map int input().split() ().split () input split q r arr = [p,q,r] arr [p,q,r] p q r arr.sort() arr.sort arr sort print(arr[0] + arr[1]) print arr[0] + arr[1] arr[0] arr 0 arr[1] arr 1 q, r = map(int, input().split()) map(int, input().split()) q p, q, r = map(int, input().split()) map(int, input().split()) p r = map(int, input().split()) map(int, input().split()) r arr = [p,q,r] [p,q,r] arr
p, q, r = map(int, input().split())
arr = [p,q,r]
arr.sort()
print(arr[0] + arr[1])