#include <iostream>
#include <string>

using namespace std;

int main() {
  string s;
  cin >> s;

  int cnt[2] = {0};
  for (auto c : s) {
    cnt[c - '0']++;
  }
  cout << 2 * min(cnt[0], cnt[1]) << endl;

  return 0;
}
