const main = stdin => {
  const input = stdin.trim().split('\n')

  const [P, Q, R] = input[0].split(' ').map(x => parseInt(x))

  console.log(P + Q + R - Math.max(P, Q, R))

}
// 標準入力
main(require("fs").readFileSync("/dev/stdin", "utf8"))
