const [a, b, c] = require("fs").readFileSync(0, "utf8").toString().trim().split(' ').map(Number);
const [sum, max] = [a+b+c-Math.max(a,b,c), Math.max(a,b,c)]
if(sum > max) console.log(sum+max);
else console.log(2*sum-1);