#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
bool pd(char c){
return (c=='A')||(c=='E')||(c=='I')||(c=='O')||(c=='U') ||(c=='Y')||(!c);
}
int main(){
char s[1000];
scanf("%s",s);
int re=0;
int k=-1;
for(int i=0;i<=strlen(s);i++){
if(pd(s[i]))
re = max(re,i-k),k=i;
}
cout<<re<<endl;
}