#include <bits/stdc++.h>
using namespace std;
void solve(string S) {
  int cnt = count(S.begin(), S.end(), '0');
  int cnt = count(S.begin(), S.end(), '0');
  cout << min((int)S.size() - cnt, cnt) * 2 << endl;
}

int main() {
  cout << setprecision(10);
  string S;
  cin >> S;
  solve(S);
  return 0;
}
