'use strict';
function main(input) {
  const array = input.split(' ').map(i => Number(i));
  const P = array[0];
  const Q = array[1];
  const R = array[2];
  console.log(Math.min(P + Q, Q + R, R + P));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));