P, Q, R = map(int, input().split())
#3つの中で1,2番目に小さい数の和
flight_time = [P, Q, R]
flight_time.sort()
answer =flight_time[0] + flight_time[1]
print(answer) P, Q, R = map(int, input().split()) P map(int, input().split()) map int input().split() ().split () input split Q R flight_time = [P, Q, R] flight_time [P, Q, R] P Q R flight_time.sort() flight_time.sort flight_time sort answer =flight_time[0] + flight_time[1] answer flight_time[0] + flight_time[1] flight_time[0] flight_time 0 flight_time[1] flight_time 1 print(answer) print answer flight_time = [P, Q, R] [P, Q, R] flight_time R = map(int, input().split()) map(int, input().split()) R answer =flight_time[0] + flight_time[1] flight_time[0] + flight_time[1] answer P, Q, R = map(int, input().split()) map(int, input().split()) P Q, R = map(int, input().split()) map(int, input().split()) Q
P, Q, R = map(int, input().split())
#3つの中で1,2番目に小さい数の和
flight_time = [P, Q, R]
flight_time.sort()
answer =flight_time[0] + flight_time[1]
print(answer)