#include <bits/stdc++.h>
int main() {
  char ai[105];
  while (~scanf("%s", ai)) {
    int t = 1, max = 1;
    for (int i = 0; ai[i] != '\0'; i++) {
      if (ai[i] != 'A' && ai[i] != 'E' && ai[i] != 'I' && ai[i] != 'O' &&
          ai[i] != 'U' && ai[i] != 'Y') {
        t++;
        max = max > t ? max : t;
      } else
        t = 1;
    }
    printf("%d\n", max);
  }
}
