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

    console.log(Math.min(P+Q,Q+R,R+P));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));