#!/usr/bin/env python3
import sys


def solve(P: int, Q: int, R: int):
    print(P + Q + R - max(P, Q, R))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    P = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    R = int(next(tokens))  # type: int
    solve(P, Q, R)


if __name__ == '__main__':
    main() import sys sys def solve(P: int, Q: int, R: int):
    print(P + Q + R - max(P, Q, R)) solve print(P + Q + R - max(P, Q, R)) print P + Q + R - max(P, Q, R) P + Q + R P + Q P Q R max(P, Q, R) max P Q R P: int P Q: int Q R: int R def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    P = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    R = int(next(tokens))  # type: int
    solve(P, Q, R) main def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
     iterate_tokens for line in sys.stdin:
            for word in line.split():
                yield word
     line sys.stdin sys stdin for word in line.split():
                yield word
     word line.split() line.split line split yield word word tokens = iterate_tokens() tokens iterate_tokens() iterate_tokens P = int(next(tokens)) P int(next(tokens)) int next(tokens) next tokens Q = int(next(tokens)) Q int(next(tokens)) int next(tokens) next tokens R = int(next(tokens)) R int(next(tokens)) int next(tokens) next tokens solve(P, Q, R) solve P Q R if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    P = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    R = int(next(tokens))  # type: int
    solve(P, Q, R) def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    P = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    R = int(next(tokens))  # type: int
    solve(P, Q, R) main def solve(P: int, Q: int, R: int):
    print(P + Q + R - max(P, Q, R)) def solve(P: int, Q: int, R: int):
    print(P + Q + R - max(P, Q, R)) solve
#!/usr/bin/env python3
import sys


def solve(P: int, Q: int, R: int):
    print(P + Q + R - max(P, Q, R))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    P = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    R = int(next(tokens))  # type: int
    solve(P, Q, R)


if __name__ == '__main__':
    main()
