#include <bits/stdc++.h>
int main() {
  char a;
  int li = 0, i = 0;
  int ans = 0;
  while (scanf("%c", &a) != EOF) {
    if (a == '\n') break;
    i++;
    if (a == 'A' || a == 'E' || a == 'I' || a == 'U' || a == 'O' || a == 'Y') {
      if (i - li > ans) ans = i - li;
      li = i;
    }
  }
  i++;
  if (i - li > ans) ans = i - li;
  printf("%d\n", ans);
  return 0;
}
