function main(arg) {
    
    var length = arg.length;
    var ary = arg.split("");
    var sum = 0;
    
    for(i=0; i < length; i++){sum = sum + Number(ary[i]);   }  
    var zero = length - sum;
    console.log(2 * Math.min(zero,sum));
    
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));