#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, k;
  string s;
  cin >> s;
  a = b = 0;
  k = s.size();
  for (int i = 0; i < k - 1; i++) {
    if (s[i] == '0') a++;
    if (s[i] == '1') b++;
  }
  cout << 2 * min(a, b) << endl;
}
