import sys
import math
import bisect

def main():
    p, q, r = map(int, input().split())
    ans = []
    ans.append(p + q)
    ans.append(q + r)
    ans.append(r + p)
    print(min(ans))
    
if __name__ == "__main__":
    main() import sys sys import math math import bisect bisect def main():
    p, q, r = map(int, input().split())
    ans = []
    ans.append(p + q)
    ans.append(q + r)
    ans.append(r + p)
    print(min(ans))
     main p, q, r = map(int, input().split()) p map(int, input().split()) map int input().split() ().split () input split q r ans = [] ans [] ans.append(p + q) ans.append ans append p + q p q ans.append(q + r) ans.append ans append q + r q r ans.append(r + p) ans.append ans append r + p r p print(min(ans)) print min(ans) min ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    p, q, r = map(int, input().split())
    ans = []
    ans.append(p + q)
    ans.append(q + r)
    ans.append(r + p)
    print(min(ans))
     def main():
    p, q, r = map(int, input().split())
    ans = []
    ans.append(p + q)
    ans.append(q + r)
    ans.append(r + p)
    print(min(ans))
     main
import sys
import math
import bisect

def main():
    p, q, r = map(int, input().split())
    ans = []
    ans.append(p + q)
    ans.append(q + r)
    ans.append(r + p)
    print(min(ans))
    
if __name__ == "__main__":
    main()
