n=input().split()
P=int(n[0])
Q=int(n[1])
R=int(n[2])
a=P+Q
b=Q+R
c=P+R
print(min(a, b, c)) n=input().split() n input().split() ().split () input split P=int(n[0]) P int(n[0]) int n[0] n 0 Q=int(n[1]) Q int(n[1]) int n[1] n 1 R=int(n[2]) R int(n[2]) int n[2] n 2 a=P+Q a P+Q P Q b=Q+R b Q+R Q R c=P+R c P+R P R print(min(a, b, c)) print min(a, b, c) min a b c n=input().split() input().split() n b=Q+R Q+R b a=P+Q P+Q a c=P+R P+R c P=int(n[0]) int(n[0]) P R=int(n[2]) int(n[2]) R Q=int(n[1]) int(n[1]) Q
n=input().split()
P=int(n[0])
Q=int(n[1])
R=int(n[2])
a=P+Q
b=Q+R
c=P+R
print(min(a, b, c))