input = require('fs').readFileSync('/dev/stdin', 'utf8')
lines = input.split('\n')
line = lines.shift().split(' ')
p = line[0] * 1
q = line[1] * 1 
r = line[2] * 1
console.log(p + q + r - Math.max(p, q, r))
