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