#include <bits/stdc++.h>
int main() {
  int i, j, max = 0, x = 0;
  char b[101];
  scanf("%s", b);
  for (i = 0; i < strlen(b); i++) {
    if (b[i] == 'E' || b[i] == 'A' || b[i] == 'I' || b[i] == 'O' ||
        b[i] == 'U' || b[i] == 'Y') {
      x = 0;
    } else {
      x++;
    }
    if (max < x) max = x;
  }
  printf("%d\n", max + 1);
}
