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