function main(input) {
    var a = input[0].split(" ")[0]-0;
    var b = input[0].split(" ")[1]-0;
    var c = input[0].split(" ")[2]-0;
    var ans = 0;
    var max = Math.max(Math.max(a,b),c);
    if(b==max){
        b = a;
        a = max;
    }else if(c==max){
        c = a;
        a = max;
    }
    ans += a-Math.max(b,c);
    if((a - ans - Math.min(b,c))%2 == 0){
        ans += (a-ans-Math.min(b,c))/2;
    }else{
        ans += ~~((a-ans-Math.min(b,c))/2)+2;
    }
    console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));


//1 2 3 4 5 6
