S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

def main():
    p,q,r=L()
    print(min(p+q,q+r,r+p))

if __name__=='__main__':
    main() S=lambda:input() S lambda:input() input() input I=lambda:int(input()) I lambda:int(input()) int(input()) int input() input L=lambda:list(map(int,input().split())) L lambda:list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split LS=lambda:list(map(str,input().split())) LS lambda:list(map(str,input().split())) list(map(str,input().split())) list map(str,input().split()) map str input().split() ().split () input split def main():
    p,q,r=L()
    print(min(p+q,q+r,r+p)) main p,q,r=L() p L() L 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 S=lambda:input() lambda:input() S def main():
    p,q,r=L()
    print(min(p+q,q+r,r+p)) def main():
    p,q,r=L()
    print(min(p+q,q+r,r+p)) main I=lambda:int(input()) lambda:int(input()) I LS=lambda:list(map(str,input().split())) lambda:list(map(str,input().split())) LS L=lambda:list(map(int,input().split())) lambda:list(map(int,input().split())) L
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

def main():
    p,q,r=L()
    print(min(p+q,q+r,r+p))

if __name__=='__main__':
    main()