#include <bits/stdc++.h>
int main() {
  int i, j, k, f = 0, n, s, t;
  int mp = 0, a, b, c, d, e, x, y, z;
  char g[1100000];
  scanf("%s", g);
  d = 0;
  e = 0;
  for (i = 0; i < 1100000; i++) {
    if (g[i] == '0') {
      d++;
    } else if (g[i] == '1') {
      e++;
    }
  }
  if (d > e) {
    y = e;
  } else {
    y = d;
  }
  x = 2 * y;
  printf("%d", x);
  return 0;
}
