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

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

ans = [P+Q, Q+R, R+P]
print(min(ans))