p,q,r=[int(x) for x in input().split()]
a=p+q
b=p+r
c=q+r
print(min(a,b,c)) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x p,q,r=[int(x) for x in input().split()] p [int(x) for x in input().split()] q r a=p+q a p+q p q b=p+r b p+r p r c=q+r c q+r q r print(min(a,b,c)) print min(a,b,c) min a b c c=q+r q+r c p,q,r=[int(x) for x in input().split()] [int(x) for x in input().split()] p q,r=[int(x) for x in input().split()] [int(x) for x in input().split()] q a=p+q p+q a r=[int(x) for x in input().split()] [int(x) for x in input().split()] r b=p+r p+r b
p,q,r=[int(x) for x in input().split()]
a=p+q
b=p+r
c=q+r
print(min(a,b,c))