P,Q,R = (int(x) for x in input().split())
print(min(P+Q,P+R,Q+R)) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x P,Q,R = (int(x) for x in input().split()) P (int(x) for x in input().split()) Q R print(min(P+Q,P+R,Q+R)) print min(P+Q,P+R,Q+R) min P+Q P Q P+R P R Q+R Q R R = (int(x) for x in input().split()) (int(x) for x in input().split()) R P,Q,R = (int(x) for x in input().split()) (int(x) for x in input().split()) P Q,R = (int(x) for x in input().split()) (int(x) for x in input().split()) Q
P,Q,R = (int(x) for x in input().split())
print(min(P+Q,P+R,Q+R))