#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
static const auto __ = [] {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  return nullptr;
}();
int solve(const std::string& S) {
  int R{0};
  int B{0};
  for (char s : S) {
    R += s == '0';
    B += s == '1';
  }
  return 2 * min(R, B);
}
int main(int argc, char* argv[]) {
  string S;
  cin >> S;
  cout << solve(S) << '\n';
  return 0;
}
