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