LI = lambda: list(map(int, input().split()))

P, Q, R = LI()


def main():
    ans = min(P + Q, Q + R, R + P)
    print(ans)


if __name__ == "__main__":
    main() LI = lambda: list(map(int, input().split())) LI lambda: list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split P, Q, R = LI() P LI() LI Q R def main():
    ans = min(P + Q, Q + R, R + P)
    print(ans) main ans = min(P + Q, Q + R, R + P) ans min(P + Q, Q + R, R + P) min P + Q P Q Q + R Q R R + P R P print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main P, Q, R = LI() LI() P R = LI() LI() R Q, R = LI() LI() Q def main():
    ans = min(P + Q, Q + R, R + P)
    print(ans) def main():
    ans = min(P + Q, Q + R, R + P)
    print(ans) main LI = lambda: list(map(int, input().split())) lambda: list(map(int, input().split())) LI
LI = lambda: list(map(int, input().split()))

P, Q, R = LI()


def main():
    ans = min(P + Q, Q + R, R + P)
    print(ans)


if __name__ == "__main__":
    main()
