P, Q, R = list(map(int, input().split()))

A = P + Q
B = P + R
C = Q + R
ans = min(A, B, C)
print(ans) 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 A = P + Q A P + Q P Q B = P + R B P + R P R C = Q + R C Q + R Q R ans = min(A, B, C) ans min(A, B, C) min A B C print(ans) print ans A = P + Q P + Q A Q, R = list(map(int, input().split())) list(map(int, input().split())) Q C = Q + R Q + R C B = P + R P + R B R = list(map(int, input().split())) list(map(int, input().split())) R P, Q, R = list(map(int, input().split())) list(map(int, input().split())) P ans = min(A, B, C) min(A, B, C) ans
P, Q, R = list(map(int, input().split()))

A = P + Q
B = P + R
C = Q + R
ans = min(A, B, C)
print(ans)