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