#include <bits/stdc++.h>
using namespace std;
int binary(long long bina) {
  int ans = 0;
  for (int i = 0; bina > 0; i++) {
    ans = ans + (bina % 2) * pow(10, i);
    bina = bina / 2;
  }
  return ans;
}
int main() {
  string s;
  cin >> s;
  int a = 0, b = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') {
      a++;
    } else {
      b++;
    }
  }
  a = a / 2 * 2;
  b = b / 2 * 2;
  if (a >= b) {
    cout << b * 2;
  } else {
    cout << a * 2;
  }
}
