#include <bits/stdc++.h>
int main() {
  int n_red = 0, n_blue = 0;
  char c;
  while (1) {
    scanf("%c", &c);
    printf("%c\n", c);
    if (c == '0')
      n_red++;
    else if (c == '1')
      n_blue++;
    else
      break;
  }
  int ans = n_red > n_blue ? 2 * n_blue : 2 * n_red;
  printf("%d", ans);
  return 0;
}
