p,q,r=[int(x) for x in input().split()]

print(min(p+q,q+r,r+p)) 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 print(min(p+q,q+r,r+p)) print min(p+q,q+r,r+p) min p+q p q q+r q r r+p r p 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 r=[int(x) for x in input().split()] [int(x) for x in input().split()] r
p,q,r=[int(x) for x in input().split()]

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