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

int main()
{
    string S;
    cin >> S;
    size_t n0 = 0;
    for(auto& c : S){
        if(c=='0') n0++;
    }
    cout<<2*min(n0, S.size()-n0)<<endl;

    return 0;
}