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