#include <bits/stdc++.h>
using namespace std;
int nr, sol;
char s[100005];
int main() {
  scanf("%s", s);
  nr = strlen(s);
  int last = -1;
  for (int i = 0; i < nr; i++) {
    if (s[i] == 'A' || s[i] == 'E' || s[i] == 'O' || s[i] == 'I' ||
        s[i] == 'U' || s[i] == 'Y') {
      sol = max(sol, i - last);
      last = i;
    }
  }
  sol = max(sol, nr - last);
  printf("%d\n", sol);
  return 0;
}
