p,q,r=map(int,input().split())
if p>=q and p>=r:
  print(q+r)
elif q>=p and q>=r:
  print(p+r)
else:
  print(p+q) p,q,r=map(int,input().split()) p map(int,input().split()) map int input().split() ().split () input split q r if p>=q and p>=r:
  print(q+r)
elif q>=p and q>=r:
  print(p+r)
else:
  print(p+q) p>=q and p>=r p>=q p q p>=r p r print(q+r) print q+r q r elif q>=p and q>=r:
  print(p+r) q>=p and q>=r q>=p q p q>=r q r print(p+r) print p+r p r print(p+q) print p+q p q p,q,r=map(int,input().split()) map(int,input().split()) p 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())
if p>=q and p>=r:
  print(q+r)
elif q>=p and q>=r:
  print(p+r)
else:
  print(p+q)