#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
    string S;
    cin >> S;
    int cnt[2] {};
    for (char c : S) cnt[c - '0']++;
    cout << 2 * min(cnt[0], cnt[1]) << endl;
}