from sys import stdin
def main():
    #入力
    readline=stdin.readline
    p,q,r=map(int,readline().split())
    print(min(p+q,q+r,r+p))
    
if __name__=="__main__":
    main() from sys import stdin def main():
    #入力
    readline=stdin.readline
    p,q,r=map(int,readline().split())
    print(min(p+q,q+r,r+p))
     main readline=stdin.readline readline stdin.readline stdin readline p,q,r=map(int,readline().split()) p map(int,readline().split()) map int readline().split() ().split () readline 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 if __name__=="__main__":
    main() __name__=="__main__" __name__ "__main__" main() main def main():
    #入力
    readline=stdin.readline
    p,q,r=map(int,readline().split())
    print(min(p+q,q+r,r+p))
     def main():
    #入力
    readline=stdin.readline
    p,q,r=map(int,readline().split())
    print(min(p+q,q+r,r+p))
     main
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    p,q,r=map(int,readline().split())
    print(min(p+q,q+r,r+p))
    
if __name__=="__main__":
    main()