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