#include <bits/stdc++.h>
int main() {
  char s[101];
  int o = 0, i = 0, saut, p;
  scanf("%s", s);
  while (i < strlen(s)) {
    p = i;
    while ((s[i] != 'A') && (s[i] != 'E') && (s[i] != 'U') && (s[i] != 'Y') &&
           (s[i] != 'O') && (s[i] != 'I') && (s[i] != '\0')) {
      i++;
    }
    saut = 1 + i - p;
    if (saut > o) o = saut;
    i++;
  }
  printf("%d", o);
  return 0;
}
