#include <bits/stdc++.h>
int max(int a, int b) {
  if (a > b)
    return a;
  else
    return b;
}
char a[10000];
int main() {
  while (~scanf("%s", a + 1)) {
    int output = 0;
    int n = strlen(a + 1);
    int pre = 0;
    for (int i = 1; i <= n; i++) {
      if (a[i] == 'A' || a[i] == 'E' || a[i] == 'I' || a[i] == 'O' ||
          a[i] == 'U' || a[i] == 'Y') {
        output = max(output, i - pre);
        pre = i;
      }
    }
    output = max(output, n + 1 - pre);
    printf("%d\n", output);
  }
}
