#include <bits/stdc++.h>
using namespace std;

int main(){
    string S;  cin >> S;
    int n = S.length()
    int r = 0, b = 0;
    for(int i=0; i<n; i++){
        if(S[i]=='0') r++;
        if(S[i]=='1') b++;
    }
    cout << 2*min(r, b) << endl;
}