
public class MaxYuanyinStr {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNextLine()){
int a = Integer.parseInt(sc.nextLine());
String s = sc.nextLine();
solve(s,a);
}
}
private static void solve(String s, int target) {
int maxLength = 0;
int i=0,j=0;
String temp = null;
while(i<s.length()){
temp = temp + s.charAt(j);
int c = calcaulate(temp);
if(c > target){
i++;
j=i;
temp = "";
}else{
maxLength = Math.max(maxLength,j-i+1);
j++;
}
}
System.out.println(maxLength);
}
private static int calcaulate(String temp) {
int count = 0;
for(int i = 0; i < temp.length(); i++) {
if(!isYuanyin(temp.charAt(i))){
count++;
}
}
return count;
}
private static boolean isYuanyin(char ch){
return ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'
|| ch =='A' || ch =='E' || ch =='I' || ch =='O' || ch =='U';
}
}