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