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