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

print(sum(sorted([P, Q, R])[:2])) P, Q, R = map(int, input().split()) P map(int, input().split()) map int input().split() ().split () input split Q R print(sum(sorted([P, Q, R])[:2])) print sum(sorted([P, Q, R])[:2]) sum sorted([P, Q, R])[:2] ([P, Q, R]) sorted [P, Q, R] P Q R :2 2 P, Q, R = map(int, input().split()) map(int, input().split()) P R = map(int, input().split()) map(int, input().split()) R Q, R = map(int, input().split()) map(int, input().split()) Q
P, Q, R = map(int, input().split())

print(sum(sorted([P, Q, R])[:2]))