def main():
    p, q, r = map(int, input().split())
    res = min(p + q, r + q, p + r)
    print(res)
    
if __name__ == '__main__':
    main() def main():
    p, q, r = map(int, input().split())
    res = min(p + q, r + q, p + r)
    print(res)
     main p, q, r = map(int, input().split()) p map(int, input().split()) map int input().split() ().split () input split q r res = min(p + q, r + q, p + r) res min(p + q, r + q, p + r) min p + q p q r + q r q p + r p r print(res) print res if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    p, q, r = map(int, input().split())
    res = min(p + q, r + q, p + r)
    print(res)
     def main():
    p, q, r = map(int, input().split())
    res = min(p + q, r + q, p + r)
    print(res)
     main
def main():
    p, q, r = map(int, input().split())
    res = min(p + q, r + q, p + r)
    print(res)
    
if __name__ == '__main__':
    main()