#include <iostream>
#include <string>

using namespace std;


int main(){
    int c0, c1;
    c0 = c1 = 0;
    string S;
    cin >> S; 
    for(int i = 0; i < N; i++){
        if(S[i] == '0') c0++;
        else c1++;
    }
    cout << 2*min(c0, c1) << endl;
}