#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[100010];
  scanf("%s", s);
  int a = 0, b = 0;
  for (int i = 0; i < strlen(s); i++) {
    if (s[i] == '0')
      a++;
    else
      b++;
  }
  cout << (a < b ? 2 * a : 2 * b) << endl;
  return 0;
}
