import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    p, q, r = map(int, input().split())
    print(min(p+q, p+r, q+r))
    
if __name__ == '__main__':
    main() import sys sys input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip def main():
    p, q, r = map(int, input().split())
    print(min(p+q, p+r, q+r))
     main 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, p+r, q+r)) print min(p+q, p+r, q+r) min p+q p q p+r p r q+r q r if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    p, q, r = map(int, input().split())
    print(min(p+q, p+r, q+r))
     def main():
    p, q, r = map(int, input().split())
    print(min(p+q, p+r, q+r))
     main input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input
import sys
input = lambda: sys.stdin.readline().rstrip()

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