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

PQ = P+Q
PR = P+R
QR = Q+R

print(min([PQ,PR,QR])) P, Q, R = map(int, input().split()) P map(int, input().split()) map int input().split() ().split () input split Q R PQ = P+Q PQ P+Q P Q PR = P+R PR P+R P R QR = Q+R QR Q+R Q R print(min([PQ,PR,QR])) print min([PQ,PR,QR]) min [PQ,PR,QR] PQ PR QR QR = Q+R Q+R QR Q, R = map(int, input().split()) map(int, input().split()) Q R = map(int, input().split()) map(int, input().split()) R P, Q, R = map(int, input().split()) map(int, input().split()) P PQ = P+Q P+Q PQ PR = P+R P+R PR
P, Q, R = map(int, input().split())

PQ = P+Q
PR = P+R
QR = Q+R

print(min([PQ,PR,QR]))