
function Main(input) {
    var P = parseInt(input[0], 10);
    var Q = parseInt(input[1], 10);
    var R = parseInt(input[2], 10);

    var sum = P + Q + R;

    var max = Math.max(P, Q, R);

    sum -= max;
    console.log(sum);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));