'use strict'

const main = input => {
	const args = input.split('\n')[0].split(' ')
	const p = parseInt(args[0], 10)
	const q = parseInt(args[1], 10)
	const r = parseInt(args[2], 10)
	let min = 200
	if ((p + q) < min) min = p + q
	if ((q + r) < min) min = q + r
	if ((r + p) < min) min = r + p
	console.log(min)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
