function Main(input){
    i=input.split("").map(Number);
    n=true
    sum=0;
    sumi=0;
    while(n){
        for(a=0;a<=i.length-1;a++){
            if(a===0)sumi=i.length;
            if(i[a]+i[a+1]===1){
                sum++;
                i.splice(a, 2);
                break;
            }
            if(a>=sumi-1&&sumi==i.length)n=false
        }
        if(i.length==0)n=false
    }
    console.log(sum*2)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));