#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int n = S.length();
  int cntr = 0, cntb = 0;
  for (int i = 0; i < n; i++) {
    if (cntr == 0 && cntb == 0 && S[i] == '1') continue;
    if (S[i] == '0') cntr++;
    if (S[i] == '1') cntb++;
  }
  cout << min(cntr, cntb) * 2 << endl;
}
