def solve():
    p, q, r = map(int, input().split())
    print(min(p+q, q+r, p+r))

if __name__ == '__main__':
    solve() def solve():
    p, q, r = map(int, input().split())
    print(min(p+q, q+r, p+r)) 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, p+r)) print min(p+q, q+r, p+r) min p+q p q q+r q r p+r p r 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, p+r)) def solve():
    p, q, r = map(int, input().split())
    print(min(p+q, q+r, p+r)) solve
def solve():
    p, q, r = map(int, input().split())
    print(min(p+q, q+r, p+r))

if __name__ == '__main__':
    solve()
