#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  long long len = s.size();
  long long cnt = 0;
  for (int i = 0; i < len; ++i) {
    if (s[i] == '1') {
      cnt++;
    }
  }
  if (cnt <= len / 2) {
    cnt = len - cnt;
  }
  cout << 2 * cnt << endl;
  return 0;
}
