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