#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vv = vector<vector<int>>;
using P = pair<int, int>;
int main() {
  string s;
  cin >> s;
  int cnt = 0;
  for (int i = 0; i < (int)(s.size()); i++) {
    if (s.at(i) == '0') cnt++;
  }
  if (cnt >= s.size() / 2) {
    cout << (s.size() - cnt) * 2 << endl;
  } else {
    cout << cnt * 2 << endl;
  }
  return 0;
}
