#include <bits/stdc++.h>
using namespace std;
int main() {
  int n0, n1;
  string s;
  cin >> s;
  size_t size = s.length();
  n0 = 0;
  for (int i = 0; i < size; ++i) {
    if (s[i] == 0) {
      n0++;
    }
  }
  n1 = size - n0;
  cout << 2 * min(n0, n1);
  return 0;
}
