#include <bits/stdc++.h>
using namespace std;
template <typename T>
std::ostream &operator<<(std::ostream &out, const std::vector<T> &v) {
  if (!v.empty()) {
    out << '[';
    std::copy(v.begin(), v.end(), std::ostream_iterator<T>(out, ", "));
    out << "\b\b]";
  }
  return out;
}
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
int solve() {
  string s;
  cin >> s;
  long long int a, b;
  for (string::iterator it = s.begin(); it != s.end(); ++it) {
    if (*it == '1') {
      ++a;
    } else {
      ++b;
    }
  }
  long long int m = min(a, b) * 2;
  return m;
}
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long int res = solve();
  cout << res;
  return 0;
}
