#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9 + 10;
int read() {
  int xx = 0, ww = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') ww = -ww;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    xx = 10 * xx + ch - 48;
    ch = getchar();
  }
  return xx * ww;
}
string str;
char s[10010];
int l, ans;
int main() {
  scanf("%s", s);
  l = strlen(s);
  str = string(s);
  for (int i = 0; i < l; i++)
    if (s[i] == '0') ans++;
  printf("%d\n", 2 * min(ans, l - ans));
  return 0;
}
