#include <bits/stdc++.h>
using namespace std;
bool comp(const vector<int>& x, const vector<int>& y) { return x[2] > y[2]; }
bool pairComp(const pair<long long, long long>& x,
              const pair<long long, long long>& y) {
  return x.first < y.first;
}
int main(void) {
  string s;
  cin >> s;
  int red = 0;
  int blue = 1;
  for (long long i = (0); i < (s.size()); ++i) {
    if (s[i] == '0') {
      red++;
    } else {
      blue++;
    }
  }
  int ans = min(red, blue) * 2;
  cout << ans << endl;
  return 0;
}
