

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



abc = P + Q
acb = Q + R
bca = P + R
print(min(abc, acb, bca)) P, Q, R = map(int, input().split()) P map(int, input().split()) map int input().split() ().split () input split Q R abc = P + Q abc P + Q P Q acb = Q + R acb Q + R Q R bca = P + R bca P + R P R print(min(abc, acb, bca)) print min(abc, acb, bca) min abc acb bca R = map(int, input().split()) map(int, input().split()) R acb = Q + R Q + R acb abc = P + Q P + Q abc P, Q, R = map(int, input().split()) map(int, input().split()) P Q, R = map(int, input().split()) map(int, input().split()) Q bca = P + R P + R bca


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



abc = P + Q
acb = Q + R
bca = P + R
print(min(abc, acb, bca))
