#include <bits/stdc++.h>

using namespace std;

int main(){
    string S;
    cin >> S;
    int cnt[2] = {};
    for (auto s: S)
        cnt[s - '0']++;

    cout << min(cnt[0], cnt[1]) * 2 << endl;
}