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