#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main(void){
    string s;
    cin>>s;
    int c0=0,c1-0;
    for(int i=0;i<s.size();i++){
        if(s[i]=='0')c0++;
        else c1++;
    }
    if(c1==0||c0==0){
        cout<<0<<endl;
    }
    else if(c1==c0){
        cout<<c1*2<<endl;
    }else cout<<abs(c1-c0)*2<<endl;
    
}
