#include <bits/stdc++.h>
using namespace std;
int main() {
  char S[100000];
  int i, A = 0, B = 0;
  cin >> S;
  for (i = 0; i < 100000; i++) {
    if (S[i] == '1')
      A += 1;
    else
      B += 1;
  }
  if (A > B)
    cout << B * 2 << endl;
  else
    cout << A * 2 << endl;
  return 0;
}
