def solve():
  p, q, r = map(int, input().split())
  print(min(p+q,q+r,r+p))
  return 0
 
if __name__ == "__main__":
  solve() def solve():
  p, q, r = map(int, input().split())
  print(min(p+q,q+r,r+p))
  return 0
  solve p, q, r = map(int, input().split()) p map(int, input().split()) map int input().split() ().split () input split q r print(min(p+q,q+r,r+p)) print min(p+q,q+r,r+p) min p+q p q q+r q r r+p r p return 0 0 if __name__ == "__main__":
  solve() __name__ == "__main__" __name__ "__main__" solve() solve def solve():
  p, q, r = map(int, input().split())
  print(min(p+q,q+r,r+p))
  return 0
  def solve():
  p, q, r = map(int, input().split())
  print(min(p+q,q+r,r+p))
  return 0
  solve
def solve():
  p, q, r = map(int, input().split())
  print(min(p+q,q+r,r+p))
  return 0
 
if __name__ == "__main__":
  solve()
