#include <bits/stdc++.h>
using namespace std;
template <typename Typell>
Typell G_C_D(Typell a, Typell b) {
  if (a < 0) a = -a;
  if (b < 0) b = -b;
  while (b != 0) {
    a %= b;
    if (a == 0) return b;
    b %= a;
  }
  return a;
}
template <typename Typell>
Typell G_C_D(const std::vector<Typell> &list) {
  Typell a = list[0];
  for (size_t i = 1; i < list.size(); ++i) {
    a = G_C_D(a, list[i]);
  }
  return a;
}
template <typename Typell>
Typell L_C_M(Typell a, Typell b) {
  if (a == 0 && b == 0) return 0;
  return a / G_C_D(a, b) * b;
}
template <typename Typell>
Typell L_C_M(const std::vector<Typell> &list) {
  Typell a = list[0];
  for (size_t i = 1; i < list.size(); ++i) {
    a = L_C_M(a, list[i]);
  }
  return a;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string S;
  cin >> S;
  int n = S.size();
  int a, b;
  for (long long i = 0; i < n; ++i) {
    if (S[i] == '0') {
      a++;
    }
    if (S[i] == '1') {
      b++;
    }
  }
  int k = min(a, b);
  cout << k * 2 << endl;
}
