#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chMax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chMin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  string S;
  cin >> S;
  int cnt = 0;
  int size = S.size();
  for (long long i = 0; i < size - 1; i++) {
    if (((S[i] == '0') && (S[i + 1] == '1')) ||
        ((S[i] == '1') && (S[i + 1] == '0'))) {
      S.erase(i, 2);
      size = S.size();
      i = -1;
      cnt++;
      if (0 == size) break;
    }
  }
  cout << cnt * 2 << endl;
  return 0;
}
