#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#define ll long long
using namespace std;
int main(){
    string s;
    cin>>s;
    
    int cnt0=0;
    for(int i=0;i<s.length();i++){
        if('0'==s[i]){
            cnt0++;
        }
    }
    int cnt1=s.lengtj()-cnt0;
    cout<<2*min(cnt0,cnt1)<<endl;
    return 0;
}