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