#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int zero, one;
  for (int i = 0; s[i] != '\0'; i++) {
    if (s[i] == '0') {
      zero++;
    } else {
      one++;
    }
  }
  if (zero > one) {
    cout << one * 2 << endl;
  } else {
    cout << zero * 2 << endl;
  }
  return 0;
}
