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

A = P + Q
B = Q + R
C = R + P

print(min(A,B,C)) [P,Q,R] = list(map(int,input().split())) [P,Q,R] P Q R list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split A = P + Q A P + Q P Q B = Q + R B Q + R Q R C = R + P C R + P R P print(min(A,B,C)) print min(A,B,C) min A B C B = Q + R Q + R B A = P + Q P + Q A C = R + P R + P C
[P,Q,R] = list(map(int,input().split()))

A = P + Q
B = Q + R
C = R + P

print(min(A,B,C))