#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c = 0, sum = 0, cn = 0, mx = 0;
  char s[101];
  scanf("%s", s);
  for (b = 0; b <= strlen(s); b++) {
    cn++;
    if (s[b] == 'A' || s[b] == 'E' || s[b] == 'I' || s[b] == 'O' ||
        s[b] == 'U' || s[b] == 'Y') {
      mx = max(cn, mx);
      cn = 0;
    }
    mx = max(mx, cn);
  }
  printf("%d\n", mx);
  return 0;
}
