p, q, r = map(int, input().split())
x = p + q
y = q + r
z = r + p

if x<=y and x<=z:
  print(x)
elif y<=x and y<=z:
  print(y)
else:
  print(z) p, q, r = map(int, input().split()) p map(int, input().split()) map int input().split() ().split () input split q r x = p + q x p + q p q y = q + r y q + r q r z = r + p z r + p r p if x<=y and x<=z:
  print(x)
elif y<=x and y<=z:
  print(y)
else:
  print(z) x<=y and x<=z x<=y x y x<=z x z print(x) print x elif y<=x and y<=z:
  print(y) y<=x and y<=z y<=x y x y<=z y z print(y) print y print(z) print z y = q + r q + r y r = map(int, input().split()) map(int, input().split()) r z = r + p r + p z x = p + q p + q x p, q, r = map(int, input().split()) map(int, input().split()) p q, r = map(int, input().split()) map(int, input().split()) q
p, q, r = map(int, input().split())
x = p + q
y = q + r
z = r + p

if x<=y and x<=z:
  print(x)
elif y<=x and y<=z:
  print(y)
else:
  print(z)
