#include <bits/stdc++.h>
int main() {
  long a, b = 0, c = 0;
  scanf("%ld", &a);
  while (a != 0) {
    if (a % 2 == 0)
      b++;
    else
      c++;
    a = a / 10;
  }
  if (b < c)
    printf("%ld\n", b * 2);
  else
    printf("%ld\n", c * 2);
  return 0;
}
