#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;


int main()
{
    string S;
    cin >> S;

    int red;
    int blue;
    for (int i = 0; i < S.size; ++i)
    {
        if(S[i] == 0){
            ++red;
        }else{
            ++blue;
        }
    }

    int ans = min(red, blue) * 2;

    cout << ans << endl;

    return 0;
}