#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int c0, c1;
  c0 = count(s.cbegin(), s.cend(), '0');
  c1 = count(s.cbegin(), s.cend(), '1');
  cout << s.length() - abs(c0 - c1) << endl;
  return 0;
}
