#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long int ones = 0;
  long int zeros = s.size() - ones;
  ones = count(s.begin(), s.end(), '1');
  cout << min(2 * ones, 2 * zeros) << '\n';
  return 0;
}
