"use strict"
function main(arg) {
    var data = arg.trim().split("\n")[0].split(" ").map(Number)
    var p,q,r
    p = data[0]
    q = data[1]
    r = data[2]

    var data = [
        p + q,
        q + r,
        r + p
    ]
    console.log(Math.min(...data))
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));