#define _USE_MATH_DEFINES
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdbool.h>
#include <float.h>
#include <limits.h>
#include <malloc.h>
#include <memory.h>
#include <complex.h>
#include <errno.h>
#include <time.h>
#define Max(X,Y) ((X)>(Y) ? (X) : (Y))
#define Min(X,Y) ((X)<(Y) ? (X) : (Y))
#define MOD 998244353
#define N 300005
long long a[12]={0,4,10,20,35,56,83,116,155,198,244,292},n;

int main()
{
	scanf("%lld",&n);
	if (n<=11) printf("%lld\n",a[n]);
	else printf("%lld\n",a[11]+49*(n-11));
	return 0;
}

#include<stdio.h>
#define	LLD	"%lld"
/*
1	5*9=1*5+10*4
--5*49=1*45+50*4
2	10*49=1*40+50*9
3	5*1+10*5=1*5+50*1
1*x+50*y=5*z+10*(x+y-z)
1*x+50*y+5z=10*(x+y)
40*y+5z=9*x
1,5,10,50ȡn��
����1ʽ������5ȡ0~8�μ��ɣ�ʣ�µĴ�1,10,50ȡ
����2ʽ����5ȡ1�λ�1������ʱ������10ȡ0~4�μ��ɣ�ʣ�µĴ�1,50ȡ
����3ʽ����5ȡ0��ʱ������10ȡ0~49�μ��ɣ�ʣ�µĴ�1,50ȡ
���ϣ�����5ȡ1~8�Σ�10ȡ0~4�κ�5ȡ0�Σ�10ȡ0~49�ε��������
1,50ȡn�Σ���n+1��ֵ
4	5*8+50*1=10*9
�ٿ������������
*/
int n;
void run(){
	int i,j;
	long long r;
	while(scanf("%d",&n)!=EOF){
		r=0;
		for(i=1;i<=n&&i<8;i++){
			for(j=0;i+j<=n&&j<5;j++){
				r+=n-(i+j)+1;
			}
		}
		for(i=0;i<=n&&i<49;i++){
			r+=n-i+1;
		}
		if(n>=8){
			r+=(n-8)+1;
		}
		printf(LLD"\n",r);
	}
}
main(){
#ifndef	ONLINE_JUDGE
	freopen("4932d_min.in","rb",stdin);
	freopen("4932d_.out","wb",stdout);
#endif
	run();
	return 0;
}

#define _USE_MATH_DEFINES
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdbool.h>
#include <float.h>
#include <limits.h>
#include <malloc.h>
#include <memory.h>
#include <complex.h>
#include <errno.h>
#include <time.h>
#define Max(X,Y) ((X)>(Y) ? (X) : (Y))
#define Min(X,Y) ((X)<(Y) ? (X) : (Y))
#define MOD 998244353
#define N 300005
long long a[12]={0,4,10,20,35,56,83,116,155,198,244,292};
int n;

int main()
{
	scanf("%d",&n);
	if (n<=11) printf("%lld\n",a[n]);
	else printf("%lld\n",(long long) a[11]+49*(n-11));
	return 0;
}

#define _USE_MATH_DEFINES
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdbool.h>
#include <float.h>
#include <limits.h>
#include <malloc.h>
#include <memory.h>
#include <complex.h>
#include <errno.h>
#include <time.h>
#define Max(X,Y) ((X)>(Y) ? (X) : (Y))
#define Min(X,Y) ((X)<(Y) ? (X) : (Y))
#define MOD 998244353
#define N 300005
long long a[12]={0,4,10,20,35,56,83,116,155,198,244,292};
int n;

int main()
{
	scanf("%d",&n);
	if (n<=11) printf("%lld\n",a[n]);
	else printf("%lld\n",a[11]+49*(n-11));
	return 0;
}


#include<stdio.h>
int main()
{
    char s[200];
    int a=-1,count=0,max=0,i;
    scanf("%s",s);
    for(i=0;i<strlen(s);i++){
        if(s[i]=='A'||s[i]=='E'||s[i]=='I'||s[i]=='O'||s[i]=='U'||s[i]=='Y'){
            count=i-a;
            if(max<count)
                max=count;
            a=i;
        }
    }
    if(strlen(s)-a>max&&max!=0){
        printf("%d\n",strlen(s)-a);
     return 0;
    }
    if(max==0)
        printf("%d\n",strlen(s)+1);
    else
    printf("%d\n",max);
    return 0;
}

#include<stdio.h>
#include<string.h>

int main(){
    char w[110];
    int i,j=0,count=0,l,x=0;
    gets(w);
    l=strlen(w);

    for(i=0;i<l;i++){

        if(w[i]=='A'||w[i]=='E'||w[i]=='I'||w[i]=='O'||w[i]=='U'||w[i]=='Y')
            {
                j=count+1;
                if(j>x)
                   x=j;
                count=0;
            }

        else{
            count++;
             j=count+1;
            if(j>x)
                x=j;
        }
    }

    printf("%d\n",x);
    return 0;
    }

#include <stdio.h>

int main(void) {
	// your code goes here
char s[101];
int i,p,q=-1,max=0;
p=-1;
scanf("%s",s);
for(i=0;s[i];i++)
{
  if(s[i]=='A' || s[i]=='E' || s[i]=='I' || s[i]=='O' || s[i]=='U' || s[i]=='Y')
   {
    q=i;
  //printf("%d\n",q);
   }
   if(max<q-p)
    max=q-p;
   p=q;
}
//printf("%d\n",i);
max=max>i-p?max:i-p;

printf("%d\n",max);

	return 0;
}

#include<stdio.h>

int main(){
    char str[101];
    scanf("%s",str);
    int i=0,v=-1,max=1,flag=1;
    for(i=0;str[i]!='\0';i++){
	if(str[i]=='A' || str[i]=='E' || str[i]=='I' || str[i]=='O' || str[i]=='U' || str[i]=='Y'){
	    if(max<i-v){
		if(flag)
		    max=i-v+1;
		else
		    max=i-v;
	    }
	v=i;
	}
	flag=0;
    }
    if(max<i-v)
	max=i-v;
    if(flag)
	printf("%d",max+1);
    else
	printf("%d",max);
    return 0;
}

#include <stdio.h>
#include <string.h>

int main() {
	int i = 0, max = 0, temp = 0;
	char s[111];

	gets(s);
	int len = strlen(s);

	while (i < len) {
		temp++;
		if (s[i] == 'A' || s[i] == 'O' || s[i] == 'U' || s[i] == 'E' || s[i] == 'I' || s[i] == 'Y') {
			if (max < temp) max = temp;
			temp = 0;
		}
		i++;
	}
	temp++;
	if (max < temp) max = temp;

	printf("%d", max);

	return 0;
}

#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
    int i,l,k=1,g=1;
    char S[101];
    gets(S);
    l=strlen(S);
    for(i=0;i<l;i++)
    {
        if(S[i]!='A'&&S[i]!='E'&&S[i]!='I'&&S[i]!='O'&&S[i]!='U'&&S[i]!='Y')
        {
            k++;
            if(k>g)
            {
                g=k;
            }
        }
        else
        {
            k=1;
        }
    }
    printf("%d\n",g);
    return 0;
}

#include<string.h>
#include<stdio.h>
int main()
{
    char a[105];
    while (~scanf("%s",a))
    {
        int ma=0;
        int temp=0;
        for(int i=0; i<strlen(a); i++)
        {
            temp++;
            if(a[i]=='A'||a[i]=='E'||a[i]=='I'||a[i]=='O'||a[i]=='U'||a[i]=='Y')
            {
                if(temp>ma)
                    ma=temp;
                temp=0;
            }
        }
//        printf("%d\n",temp);
        if(temp+1>ma)
            ma=temp+1;
        printf("%d\n",ma);
        memset(a,'\0',sizeof(a));
    }
}

#include<stdio.h>
#include<string.h>
int main()
{
  char s[101];
  int i,j,m=0,p,count[100],temp;
  gets(s);
  s[strlen(s)]='*';
  for(i=0;i<=strlen(s);i++)
  {
    if(s[i]=='A'||s[i]=='E'||s[i]=='I'||s[i]=='O'||s[i]=='U'||s[i]=='Y'||s[i]=='*')
    {
        count[m]=i+1-p;
        p=i+1;
        m++;
    }
  }
  for(i=1;i<m;i++)
    for(j=0;j<m-i;j++)
        if(count[j]<count[j+1])
        {
             temp=count[j];
             count[j]=count[j+1];
             count[j+1]=temp;
        }
  printf("%d",count[0]);
  return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int counter=-1,help=-1, last=-1, check=0, hello=0;
    char str[101];
    scanf("%s",str);
    for(int i=0; i<strlen(str); i++)
    {
        if(str[i]=='A' || str[i]=='E' || str[i]=='I' || str[i]=='O' || str[i]=='U' || str[i]=='Y')
        {
            help=i;
            if(help-counter > last)
             {
                 last=help-counter; counter=i;

             }
             else counter=i;
            check++; hello=i;
        }
         else if(i==strlen(str)-1 && (strlen(str)+1)-counter>last)
            {last=strlen(str)+-counter;}
    }
    if(check==1 && last<2) printf("%d", (strlen(str)-hello));
    else if(last==-1) printf("%d", strlen(str)+1);
    else printf("%d", last);
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
	char s[101];
        scanf("%s",s);
	int l=strlen(s);
	int m=1,w=0,i;
	for(i=0;i<l;i++)
	{
		if(s[i]=='A'||s[i]=='E'||s[i]=='I'||s[i]=='O'||s[i]=='U'||s[i]=='Y')
		m=1;
		else
			m++;
		if(m>=w)
			w=m;
	}
	printf("%d\n",w);

	return 0;
}

#include <stdio.h>
#include <string.h>
#define MAX 107

int main()
{
	char str[MAX];
	int i, len, prev = -1, max = 0;
	scanf("%s", str);
	len = strlen(str);
	for(i=0;i<len;++i)
	{
		if(str[i] == 'A' || str[i] == 'E' || str[i] == 'I' || str[i] == 'O' || str[i] == 'U' || str[i] == 'Y')
		{
			max = (i - prev) > max ? (i - prev) : max;
			prev = i;
		}
	}
	max = (i - prev) > max ? (i - prev) : max;
	printf("%d\n", max);
	return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[100];
    int i,l,count=0,max=0;
    gets(s);
    l=strlen(s);
    for(i=0;i<l;i++)
    {
        if ( s[i]== 65 || s[i]==69 || s[i]==73 || s[i]==79 || s[i]==85 ||s[i]==89)
        {
            count=0;
        }
        else{
            count++;
            if(max<count)
            {
                max=count;
            }
        }
    }
    printf("%d",max+1);
    printf("\n");
    return 0;
}

#include<stdio.h>
#include<string.h>

int main()

{
    int count=1,max=1,last,n,i,j,k;
    char a[110];
    scanf("%s",a);
    n=strlen(a);
    for(i=0;i<n;i++)
    {
        if(a[i]!='A'&&a[i]!='E'&&a[i]!='I'&&a[i]!='O'&&a[i]!='U'&&a[i]!='Y')
        {
            count++;
        }
        else
        {
            if(count>max)
                {
                    max=count;
                }
                count=1;
        }
        //printf("%c %d %d\n",a[i],count,max);
    }
    if(max>count)
        printf("%d",max);
    else
        printf("%d",count);
}

#include<stdio.h>
#include<string.h>
int i,t=-1,sry;
char srx[1001];
int max(int x,int y)
{
    if(x>y)
    return x;
    return y;
}
int main()
{
    scanf("%s",srx);
    for(i=0;i<strlen(srx);i++)
    if(srx[i]=='A'||srx[i]=='E'||srx[i]=='I'||srx[i]=='O'||srx[i]=='U'||srx[i]=='Y')
    {sry=max(i-t,sry);
    t=i;}
    sry=max(sry,strlen(srx)-t);
    printf("%d",sry);
    return 0;
}

#include <Stdio.h>
#include <string.h>

int main() {
	char str[100];
	scanf("%s",str);
	int len=strlen(str);
	int ans=0;
	int i;
	int d;
	int current=-1;
	for(i=0;i<len;i++){
		if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||str[i]=='Y'){
			d=i-current;
			if(d>ans){
				ans=d;
			}
			current=i;
		}
	}
	if(len-current>ans){
		ans=len-current;
	}
	printf("%d",ans);
}

#include<stdio.h>
#include<string.h>
int main()
{
    char a[100];
    scanf("%s",a);

    int i,count=1,d=0;
    for(i=0;i<strlen(a);i++)
    {
        if(a[i]!='A' && a[i]!='E' && a[i]!='I' &&  a[i]!='O' && a[i]!='U' &&  a[i]!='Y')
           {
            count++;

                }
        else
        {
            if(count>d)
            {
                d=count;

            }
            count=1;
        }
    }

    if(d>count)
        printf("%d",d);
    else
        printf("%d",count);
}

#include<stdio.h>
#include<string.h>

char a[101];
int d[101];

int v_c(char ch){
	switch(ch)
	{
			case 'A':
			case 'E':
			case 'I':
			case 'O':
			case 'U':
			case 'Y':
			case '\0':

				return 1;
					break;

			default:
			 return 0;
	}
}

int main(){
	fflush(stdin);
	gets(a);
	int i,j,alien = 1,dist = 0,temp = 0,k=1;
	for(i=0;i<strlen(a);i++){
		temp = dist;
		char ch = a[i];
		if(v_c(ch)==1){
			for(j=i+1;j<strlen(a)+1;j++){
				char ch1 = a[j];
				if(v_c(ch1)==1){
					dist = j-i;
					d[k] = dist;
					k++;
					//printf("%d",dist);
					break;
				}
			}
		}
		else if(v_c(ch) == 0){
			alien++;
		}
	}

	for(i=0;i<strlen(a);i++){
		char cd = a[i];
		if(v_c(cd) == 1){
			d[0] = i+1;
			break;
		}
	}

	int maximum = d[0],c;
  for (c = 1; c < 101; c++){
    if (d[c] > maximum){
       maximum  = d[c];
    }
  }
	if(maximum > 0){
		printf("%d",maximum);
	}
	else{
		printf("%d",alien);
	}

	return 0;
}

#include <stdio.h>
#include <string.h>

int isvowel(char c) {
	return c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'Y';
}

int main() {
	static char s[128];
	int n, i, j, max;

	scanf("%s", s);
	n = strlen(s);
	for (i = 0; i < n; i++)
		if (isvowel(s[i]))
			break;
	max = i + 1;
	for (i = 0; i < n; i++)
		for (j = i + 1; j < n; j++) {
			int k, cnt;

			cnt = 0;
			for (k = i; k <= j; k++)
				if (!isvowel(s[k]))
					cnt++;
				else
					cnt = 1;
			if (max < cnt)
				max = cnt;
		}
	printf("%d\n", max);
	return 0;
}

#include<stdio.h>
int main()
{
    char a[101];
    scanf("%s",a);
    int l=strlen(a),i,c[100],k=0,max=1,d=1,p=0;
    for(i=0;i<l;i++)
    {
        if(a[i]=='A' || a[i]=='E' || a[i]=='I' || a[i]=='O' || a[i]=='U' || a[i]=='Y')
        {
            c[k]=i+1;
            if(k==0)
                d=c[k];
            if(k>=1)
                d=c[k]-c[k-1];
            if(d>max)
                max=d;
            k++;
        }
        else
            p++;
        if(i==l-1)
            d=(i+1)-c[k-1]+1;
            if(d>max)
                max=d;
    }
    if(p==l)
        printf("%d",p+1);
    else
    printf("%d",max);
    return 0;
}
//ABABBBACFEYUKOTT
//CFHFPTGMOKXVLJJZJDQW
//ABBABBB

#include<stdio.h>
#include<string.h>
int main()
{
char s[101];
scanf("%s",s);
int l=strlen(s);
int m=1,w=0,i;
for(i=0;i<l;i++)
{
if(s[i]=='A'||s[i]=='E'||s[i]=='I'||s[i]=='O'||s[i]=='U'||s[i]=='Y')
m=1;
else
m++;
if(m>=w)
w=m;
}
printf("%d\n",w);
return 0;
}

#include <stdio.h>
#include <string.h>

int max(int a,int b)
{
  return a>b?a:b ;
}

int main()
{
  char str[100] ;
  scanf("%s",str) ;

  int ans = 1 , prev = -1  ;

  for( int i = 0 ; i < strlen(str) ; i++ )
  {
    if( str[ i ] == 'A' || str[ i ] == 'E' || str[ i ] == 'I' || str[ i ] == 'O' || str[ i ] == 'U' || str[ i ] == 'Y')
    {
      ans = max( ans , i - prev  );
      prev = i ;
    }
  }
  ans = max( ans , strlen(str) - prev);
  printf("%d",ans) ;
  return 0 ;
}

#include<stdio.h>
#include<string.h>
#define max(a,b) a>b?  a: b
int main()
{
	int i, cnt=0,m=0,n;
	char s[200];
	scanf("%s", s);
	n = strlen(s);
	for(i=0; i<n; i++)
	{
		if(s[i]=='A'||s[i]=='E'||s[i]=='I'||s[i]=='O'||s[i]=='U'||s[i]=='Y')
		{
			m = max(m,cnt);
			cnt=0;
		}
		else
			cnt++;
	}
	m = max(m,cnt);
	printf("%d\n", m+1);
	return 0;
}

#include<stdio.h>
#include<string.h>
main()
{
    char a[105];
    int i,j,k,len,max=0,dis=0,start=0,end=0,flag=0;
    scanf("%s",a);
    len=strlen(a);
    for(i=0;i<len;i++)
    {
        if(a[i]=='A' || a[i]=='E' || a[i]=='I' || a[i]=='O' || a[i]=='U' || a[i]=='Y' )
        {   end=i+1;
            dis=end-start;
            if(dis>max)max=dis;
            start=end;flag=1;
        }
        if(i==(len-1) && (!(a[i]=='A' || a[i]=='E' || a[i]=='I' || a[i]=='O' || a[i]=='U' || a[i]=='Y' )))
        {
            end=i+2;
            dis=end-start;
            if(dis>max)max=dis;
        }

    }
    if(flag==0)printf("%d\n",len+1);
    else printf("%d\n",max);
    return 0;

}

#include<stdio.h>

int main()
{
    int jump=1, ja=1, i, j;
    char s[101];
    scanf("%s", s);
    for(i=0; i<strlen(s); i++)
    {
        if(!(s[i]=='A' || s[i]=='E'|| s[i]=='I' || s[i]=='O' || s[i]=='U' || s[i]=='Y'))
        {
            jump++;
            if(jump>ja)
                ja=jump;
        }
        else
            jump=1;
    }

    printf("%d\n", ja);
    return 0;
}

#include<stdio.h>
#include<string.h>
int max(int a,int b)
{
	return a>b?a:b;
}
int min(int a,int b)
{
	return a<b?a:b;
}
int main()
{
	char string[101];
	scanf("%s",string);
	int len=strlen(string);
	int i;
	int x=-1,jumpAbility=1;
	int maxJump=1,flag=0;
	for(i=0;i<len;i++)
	{
		switch(string[i])
		{
			case 'A':
			case 'E':
			case 'I':
			case 'O':
			case 'U':
			case 'Y':
			jumpAbility=max(jumpAbility,maxJump);
			maxJump=1;
			/*
			flag=1;
			//printf("%d\n",jumpAbility);
			maxJump=max(i-x,maxJump);
			jumpAbility=min(maxJump,jumpAbility);
//			printf("mJ%d\n",maxJump);
				x=i;
*/
				break;
			default:
				maxJump++;
				break;
		}
	}
	jumpAbility=max(jumpAbility,maxJump);
	printf("%d",jumpAbility);
	return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{

      int len,i=0,count=0,car[100],j=0;
      char ar[105];
      scanf("%s",ar);
      len=strlen(ar);

   {

         for(i=0;i<len;i++)
      {
          if(ar[i]=='A' || ar[i]=='E' || ar[i]=='I'|| ar[i]=='O' || ar[i]=='U' || ar[i]=='Y')
          {
              count++;
              car[j]=count;
              j++;
              count=0;

          }

          else count++;

      } car[j]=count+1;
        car[j+1]='\0';
                    int m,temp;
                    for(i=0;i<=j;i++)

                    {
                        for(m=i+1;m<=j;m++)
                        {
                            if(car[i]<car[m])
                            {
                                temp=car[i];
                                car[i]=car[m];
                                car[m]=temp;
                            }

                        }
                    }

                           printf("%d\n",car[0]);
                          }

    return 0;

}

#include<stdio.h>

main()
{
    int n,a=0,d=0,i,jump=0,max=0,flag=0,p=-1;
    char s[100010];
    gets(s);
    n=strlen(s);
   // printf("%d\n",n);
     for(i=0;i<n;i++)
    {
        if(s[i]=='A' || s[i]=='E' || s[i]=='I' || s[i]=='O' || s[i]=='U' || s[i]=='Y' )
        {
            if(flag==0)
            {
                jump=i;
                max=jump+1;
                p=i;
                flag=1;

            }
            else
            {
                jump=i-p;
                if(jump>max) max=jump;
                p=i;

            }

        }
        if(i==n-1)
        {
            jump=n-p;
            if(jump>max) max=jump;
        }

    }
    printf("%d\n",max);
    return 0;

}

#include<stdio.h>
#include<stdlib.h>
int main()
{
	char a[100];
	int i=0,count=0,j=0,max=0,round=1;
	scanf("%s",a);
	while(a[i]!='\0'){
		count++;
		i++;
		}

	while(j<count)
	{
		i=j;
		while(a[i]!='A'&&a[i]!='E'&&a[i]!='I'&&a[i]!='O'&&a[i]!='U'&&a[i]!='Y'&&a[i]!='\0')
		{
			round++;
			i++;
		}
		if(max<round)
			max=round;

		j=i+1;
		round=1;
	}
	printf("%d",max);
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int is_vowels(char carac);

int main(int argc, char const *argv[])
{
	char s[100];
	int i = 0,long_saut=0,max_saut=0;
	scanf("%s",s);
	for (; i < strlen(s); ++i)
	{
		long_saut++;
		if (is_vowels(s[i]))
		{
			if (max_saut < long_saut) max_saut = long_saut;
			long_saut = 0;
		}
	}
	long_saut++;
	if (max_saut < long_saut) max_saut = long_saut;

	printf("%d\n", max_saut);
}
int is_vowels(char carac)
{
	if (carac == 'A' || carac == 'E' || carac == 'I' ||
		carac == 'O' || carac == 'U' || carac == 'Y' )
	return 1 ;
	return 0 ;
}

#include<stdio.h>//
#include<string.h>

int main(){
    int i,l,max=0,count=0;
    char s[100];
    gets(s);
    l=strlen(s);
    for(i=0;i<=l;i++){
        count+=1;
        if (s[i] == 'A' || s[i] == 'I' || s[i] == 'U' || s[i] == 'E' || s[i] == 'O' || s[i] == 'Y' || s[i]=='\0') {
            if(max<count){
                max=count;
            }
            count=0;
        }
        if(max==0)
            max=count;
    }
    printf("%d\n",max);
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    int  i,j;char a[1000];
    gets(a);
    int len =strlen(a);
    a[len]='A';
    a[len+1]='\0'; int  res,cnt=-1,max=-4;
    for(i=0;i<len+1;i++){
        if(a[i]=='A'||a[i]=='E'||a[i]=='I'||a[i]=='O'||a[i]=='U'||a[i]=='Y')
        {
            res=i-cnt;
            cnt = i;
            if(max<res)max=res;
        }
        }

    printf("%d\n",max);
    return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    int a = 1,b,i,max = 0;
    char x[100];
    gets(x);
    b = strlen(x);
    for(i = 0; i<b; i++) {
        if(x[i] == 'A' || x[i] == 'E' || x[i] == 'I' || x[i] == 'O' || x[i] == 'U' || x[i] == 'Y') {
            if(a>max) {
                max = a;
            }
            a = 1;
        } else {
            a++;
        }
    }
    if(max<a) {
        max = a;
    }
    printf("%d\n", max);
}

#include <stdio.h>
#include <string.h>

char vowels[] = "AEIOUY\n";

int current, max, c;

int main(void) {
    while (c = getchar(), c != EOF) {
        ++current;
        if (current > max) max = current;
        if (strchr(vowels, c)) current = 0;
    }
    printf("%d\n", max);
    return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<Windows.h>
#include<string.h>
int main() {
	char str[101];
	scanf("%s", str);
	int start = -1, end = strlen(str), res = 0;
	int index;
	for (index = 0; index < strlen(str); ++index) {
		if (str[index] == 'A' ||
			str[index] == 'E' ||
			str[index] == 'I' ||
			str[index] == 'O' ||
			str[index] == 'U' ||
			str[index] == 'Y') {
			res = res > (index - start) ? res : (index - start);
			start = index;
		}
	}
	res = res > (end - start) ? res : (end - start);
	printf("%d\n", res);
	//system("pause");
}

#include<stdio.h>
#include<string.h>
int main()
{
	int i,cnt=1,max=-1;
	char s[102];
	gets(s);
	for(i=0;i<strlen(s);i++){
		if(s[i]=='A'||s[i]=='O'||s[i]=='U'||s[i]=='I'||s[i]=='E'||s[i]=='Y') cnt=1;
		else cnt++;
		if(cnt>max) max=cnt;
	}
printf("%d",max);
}

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

int notupper(char *ch) {

	 int i=0;
	while(i<strlen(ch)){
		if(ch[i]<65 ||ch[i]>91) {

		return 1;
		}
i++;	}

	return 0;
}

int main(){

char ch[10000];

 do{
gets(ch);
 }while (notupper(ch) ||*ch=='\n')  ;

int max=0,j=1;
int i;
for(  i=0;i<strlen(ch);i++){

	if(ch[i]=='I'||ch[i]=='Y'||ch[i]=='O'||ch[i]=='U'||ch[i]=='E'||ch[i]=='A')
	{

		j=1;

	}else{
		if(j!=0){
			j++;
		}

	}

	if (j>max){
        	max=j;

			}
}
if(max==0)
printf("%d",max+strlen(ch)+1);
else
printf("%d",max);

	return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <inttypes.h>

#define REP(I, N) for (int I = 0; I < (N); ++I)
#define RI(X) scanf("%d", &(X))

int min(int a, int b){
	return (a < b) ? a : b;
}

int max(int a, int b){
	return (a > b) ? a : b;
}

int main(){
    int t,n=1,vec[10]={0},aux=1;
    char str[102];
    scanf("%s",str);
    t=strlen(str)+1;
    for(int i=0;i<t;i++){
        if(str[i]=='A'|| str[i]=='E' || str[i]=='I' || str[i]=='O'||str[i]=='U' || str[i]=='Y'){
        n=max(aux,n);
        aux=1;}
        else aux++;
    }
    n=max(aux-1,n);
    printf("%d\n",n);
    return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    char s[101];
    scanf("%s", s);
    int i, len = strlen(s), count = 1, max = 0;

    for(i = 0; i < len; i++)
    {
        if(s[i] == 'A' || s[i] == 'E' || s[i] == 'I' || s[i] == 'O' || s[i] == 'U' || s[i] == 'Y')
        {
            count = 1;
        }
        else count++;
        if(count > max) max = count;
    }
    printf("%d\n", max);
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
	char str[101];
	scanf("%s",str);
	int pr=0,curr=0;
	int i,max=0;

	for(i=0;i<strlen(str);i++)
	{
		if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||str[i]=='Y')
		{
			curr=i+1;
		}
		else if(i==strlen(str)-1)curr=i+2;
	if(curr-pr>max)max=curr-pr;

	pr=curr;
	}
	printf("%d",max);
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
main()
{
    int l=-1,r,dis=0,max=0,i;
    char al[200];
    gets(al);
    al[strlen(al)]='A';
    for(i=0;i<=strlen(al);i++)
    {
        if(al[i]=='A'||al[i]=='E'||al[i]=='O'||al[i]=='U'||al[i]=='I'||al[i]=='Y')
        {
            dis=(i-l);
            l=i;
        }
        if(dis>max)max=dis;
    }
    printf("%d",max);
}

#include<stdio.h>
#include<string.h>

int main()
{
    char a[1000];
    int i,j,la,h,t;
    t=0;
    h=-1;
    gets(a);
    la=strlen(a);
    for (i=0;i<la;i++)
        if ( a[i]=='A' || a[i]=='E' || a[i]=='I' || a[i]=='O' || a[i]=='U' || a[i]=='Y')
        {
            if (i-h>t) t=i-h;
            h=i;
        }
    if (la-h>t) t=la-h;
    printf("%d\n",t);
    return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    char arr[100];
    scanf("%s", arr);
    int max=0;
    int i=0;
    int lastPoint=-1;
    for(i=0; i<strlen(arr); i++)
    {
        if(arr[i]!='A'&&arr[i]!='E'&&arr[i]!='I'&&arr[i]!='O'&&arr[i]!='U'&&arr[i]!='Y')
            continue;

            else {

            if(max<i-lastPoint)
            {
                max=i-lastPoint;

            }
        lastPoint=i;}
    }

                if (max<strlen(arr)-lastPoint)
                    max=strlen(arr)-lastPoint;
    printf("%d", max);
}

#include<stdio.h>
#include<string.h>
int main (){int i,j,min=0,pos=0,temp=0,yes=0,l,graze=0;char hopper[110];gets(hopper);l=strlen(hopper);for(i=0;i<l;i++){if(hopper[i]=='A' || hopper[i]=='E' || hopper[i]=='I' || hopper[i]=='O' || hopper[i]=='U' || hopper[i]=='Y'){if(yes==0 && i!=0)graze=1;if(i>pos){temp=i-pos;if(temp>min)min=temp+graze,graze=0;pos=i;}yes=1;}else{if(i==l-1){temp=(i-pos)+1;if(temp>min)min=temp;}}}if(yes==0)min=++i;else{if(min==0)min=1;}printf("%d\n",min);return 0;}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
    int i,j,k,l=0,m=0,n;
    char str[1000];
    str[0]='0';
    gets(&str[1]);
    n=strlen(str);
    for(i=0;i<n;i++)
    {
        if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||str[i]=='Y')
        {
            if(i-l>m)
            {
                m=i-l;
                l=i;
            }
            else l=i;
        }
    }
    if(i-l>m) m=i-l;
    printf("%d",m);
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#define max(x,y) (x>y?x:y)

int a[10];
void Input()
{
    a['A']=1;
    a['E']=1;
    a['I']=1;
    a['O']=1;
    a['U']=1;
    a['Y']=1;
}

int main()
{
    Input();
    char b[110];
    while(~scanf("%s",b))
    {
        int i,sum=0,val=-1;
        for(i=0; b[i]!='\0'; i++)
        {
            if(a[b[i]]==1)
            {
                sum=max(sum,i-val);
                val=i;
            }
            if(b[i+1]=='\0')
                sum=max(sum,i-val+1);
        }
        printf("%d\n",sum);
    }
    return 0;
}

#include <stdio.h>
#define max(x,y)(x >= y)?x:y
int main()
{
	int n = 0;
	int length = 0;
	char a[100];
	int b[100] = {0};
	int ability = 1;
	scanf("%s",&a);
	for(int i =0;i <= 99;i++)
	{
		if(a[i] == 'A' || a[i] == 'E' || a[i] == 'I' || a[i] == 'O' || a[i] == 'U' || a[i] == 'Y')
		{
			b[n] = i;
			n++;
		}
	}
	for(;a[length] != '\0';length++) ;
	if(n != 0){
	for(int i =0;i <= 98;i++)
	{
		ability = max(ability,(b[i + 1] - b[i]));
	}
	ability = max(ability,(length - b[n - 1]));
	ability = max(ability,(b[0] + 1));
	printf("%d",ability);
	} else
	{
		printf("%d",length + 1);
}
	return 0;
}

#include<stdio.h>

int main()
{
    char arr[101];
    int i,j,kA=0,ke=0,ki=0,ko=0,ku=0,k=0;
    scanf("%[^\n ]",arr);
    i =0;
    while(arr[i]!='\0')
    {
        if (arr[i]== 'A'|| arr[i]=='a')
        kA=1;

         else if (arr[i]== 'E'|| arr[i]=='e')
        ke=1;

        else if (arr[i]== 'I'|| arr[i]=='i')
        ki=1;
       else  if (arr[i]== 'O'|| arr[i]=='o')
      ko=1;

        else if (arr[i]== 'U'|| arr[i]=='u')
         ku=1;
         i++;
    }
    k=kA+ke+ki+ko+ku;
    printf("%d\n",k);

    return 0;
}

#include<stdio.h>
#include<string.h>

int main()
{
	char str[1000];
	int i,n;

	scanf("%s",str);
	n = strlen(str);

	int result = 0;
	int count = 0;

	for(i=0;i<n;i++)
	{
	  count++;
		if(str[i] == 'A' || str[i] == 'E' || str[i] == 'I' \
	   || str[i] == 'O' || str[i] == 'U' || str[i] == 'Y'){
			 if(count > result) {
			 	result = count;
				count = 0;
			}else
				count = 0;
		}
	}

	if(count >= result)
		result = count;

	printf("%d",result);
}

#include <stdio.h>
int is_vowels(char carac);

int main(int argc, char const *argv[])
{
	int j,s=1,max = 1,i=0;
	char carac;
	while((j=scanf("%c",&carac) != EOF) && j != feof )
	{
    	i++;
    	if (is_vowels(carac) )
    	{
    		if(s > max) max = s;
    		s=1;
    	}
    	else s++;

	}
	printf("s=%d\ti=%d\tmax=%d\t",s,i, max);
	if(i == 1 && s > max) max = s;
	printf("%d\n", max);
}
int is_vowels(char carac)
{
	if (carac == 'A' || carac == 'E' || carac == 'I' ||
		carac == 'O' || carac == 'U' || carac == 'Y' )
	return 1 ;
	return 0 ;
}

#include<stdio.h>
#include<string.h>
int main()
{
    char s[101];
    gets(s);
    int i,count=0,max=0;
    for(i=0;i<strlen(s);i++)
    {
        if(s[i]!='A' && s[i]!='E' && s[i]!='I' && s[i]!='O' && s[i]!='U' && s[i]!='Y')
        {
            count++;
        }
        else
        {
            if(count+1>max) max=count+1;
            count=0;
        }
    }
    printf("%d",max);
    return 0;
}

#include <stdio.h>

int isVowel(char c);

int main(void)
{
	char str[101];
	scanf("%s", str);

	int maxJump = 0, prevVowel = -1;
	int i;

	for(i = 0, prevVowel = -1; str[i] != '\0'; i++)
	{
		if(isVowel(str[i]))
		{
			if(i - prevVowel > maxJump) maxJump = i - prevVowel;
			prevVowel = i;
		}
	}

	printf("%d\n", maxJump ? maxJump : i + 2);

	return 0;
}

int isVowel(char c)
{
	switch(c)
	{
		case 'A':
		case 'E':
		case 'I':
		case 'O':
		case 'U':
		case 'Y':
			return 1;
		default:
			return 0;
	}
}

#include<stdio.h>
#include<math.h>
#include<string.h>

char paper[105];
int dis[105];

int main(void)
{
	int r,s = 0,n,rr;
	scanf("%s",paper);
	n = strlen(paper);

	if(panduan(n,paper) == 0)
	{
		printf("%d",n+1);
	}
	else
	{
			for(r = 0;r < n;r++)
		{
			if( paper[r] == 65 || paper[r] == 69 || paper[r] == 73 || paper[r] == 79 || paper[r] == 85 || paper[r] == 89 )
			{
				dis[s] = r + 1;
				s++;
			}
			else
				;
		}

		printf("%d",farthest(s,n,dis));
	}

	return 0;
}

int farthest(int n,int zong,int a[])
{
	int x = 1,i;

	for(i = 0;i < n-1;i++){
		if(fabs(a[i] - a[i+1]) > x)
		{
			x = fabs(a[i] - a[i+1]);
		}
		else
			;
	}

	return (x>(zong-dis[n-1]+1)?x:zong-dis[n-1]+1);
}

int panduan(int c,char b[])
{
	int ii,buer=0;
	for(ii = 0;ii < c;ii++)
	{
		if(b[ii]==65||b[ii]==69||b[ii]==73||b[ii]==79||b[ii]==85||b[ii]==89)
			buer++;
		else
			;
	}
	return buer;
}

#include<stdio.h>
#include<string.h>
int main()
{
	char str[101];
	scanf("%s",str);
	int i,j=0;
	int max=1;
	if(strlen(str)==1&&(str[j]!='A'&&str[j]!='E'&&str[j]!='I'&&str[j]!='O'&&str[j]!='U'&&str[j]!='Y'))max=2;
	int flag=0;

	for(i=0;i<strlen(str);i++)
	{
		if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||str[i]=='Y')
		{
		flag=1;
		//printf("%d",flag);
		for(j=i+1;j<strlen(str);j++)
		{
			if(str[j]=='A'||str[j]=='E'||str[j]=='I'||str[j]=='O'||str[j]=='U'||str[j]=='Y'||j==strlen(str)-1)
			{
				if(j-i>max)max=j-i;
				break;
			}
		}
		}
	}
	if(flag==0)max=strlen(str)+1;
	printf("%d",max);
}

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<ctype.h>

char paper[101];
int dis[101];

int main(void)
{
	int r,s = 0,n,rr;
	scanf("%s",paper);
	n = strlen(paper);

	if(panduan(n,paper) == 0)
	{
		printf("%d",n);
	}
	else
	{
			for(r = 0;r < n;r++)
		{
			if( paper[r] == 65 || paper[r] == 69 || paper[r] == 73 || paper[r] == 79 || paper[r] == 85 || paper[r] == 89 )
			{
				dis[s] = r + 1;
				s++;
			}
			else
				;
		}

		printf("%d",farthest(s,dis));
	}

	return 0;
}

int farthest(int n,int a[])
{
	int x = 1,i;
	for(i = 0;i < n-1;i++){
		if(fabs(a[i] - a[i+1]) > x)
		{
			x = fabs(a[i] - a[i+1]);
		}
		else
			;
	}

	return x;
}

int panduan(int c,char b[])
{
	int ii,buer=0;
	for(ii = 0;ii < c;ii++)
	{
		if(b[ii]==65||b[ii]==69||b[ii]==73||b[ii]==79||b[ii]==85||b[ii]==89)
			buer++;
		else
			;
	}
	return buer;
}

#include<stdio.h>
#include<string.h>
int i,t=1,sry;
int max(int x,int y)
{
    if(x>y)
    return x;
    return y;
}
char srx[1001];
int main()
{
    scanf("%s",srx);
    for(i=0;i<=strlen(srx);i++)
    {if(srx[i]=='A'||srx[i]=='E'||srx[i]=='I'||srx[i]=='O'||srx[i]=='U'||srx[i]=='Y')
    {sry=max(t-i,sry);
    t=i;}}
    if(sry!=strlen(srx))
    sry=max(sry,strlen(srx)+1-t);
    printf("%d",sry);
    return 0;
}

#include <stdio.h>
#include <string.h>

int main()
{
    int a = 1,b,i,max = 0;
    char x[100];
    gets(x);
    b = strlen(x);
    for(i = 0; i<b; i++) {
        if(x[i] == 'A' || x[i] == 'E' || x[i] == 'I' || x[i] == 'O' || x[i] == 'U') {
            if(a>max) {
                max = a;
            }
            a = 1;
        } else {
            a++;
        }
    }
    if(max<a) {
        max = a;
    }
    printf("%d\n", max);
}

//codeforces problem
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int isvowel(char ch)
{
    if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='Y')
        return 1;
    return 0;

}
int main()
{
    //grasshopper and the string
    char s[101];
    scanf("%s",s);

    int l=strlen(s);
    int jump=0;
    int i;
    for(i=0;i<l;)
    {
        if(isvowel(s[i]))
        {
            int j=i+1,co=0;
            if(j<l&&isvowel(s[j]))
            {
                co=1;
            }
            else
            while(j<l&&!isvowel(s[j]))
            {
                j++;
                co++;
            }
            //printf("From %c to %c\n",s[i],s[j]);
            i=j;
            //printf("Jump=%d\n",co);
            if(co>=jump)
            {if(co==1)
                jump=co;
            else
                jump=co+1;}
            //printf("New jump %d\n",jump);
        }
        else
            i++;
    }
    if(jump==0)
        jump=l+1;
    printf("%d\n",jump);
    return 0;
}

#include <stdio.h>
int main(void) {
	char a[100];int i,count=0,max=0,length=0;
	scanf("%s",a);
	for(i=0;a[i]!='\0';i++)
	{
		length++;
	if((a[i]=='A') || (a[i]=='E') || (a[i]=='I') || (a[i]=='O') || (a[i]=='U') || (a[i]=='Y'))
	{
		count++;
		if(count>max)
		{
			max=count;
		}
	count=0;
	}
	else count++;
	}
	if(max==0)
	printf("%d",(length+1));
	else printf("%d",max);
}

//codeforces problem
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int isvowel(char ch)
{
    if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='Y')
        return 1;
    return 0;

}
int main()
{
    //grasshopper and the string
    char s[101];
    scanf("%s",s);
    int l=strlen(s);
    int jump=0;
    int i;
    for(i=0;i<l;)
    {
        if(isvowel(s[i]))
        {
            int j=i+1,co=0;
            do
            {
                j++;
                co++;
            }while(j<l&&!isvowel(s[j]));
            i=j;

            if(co>jump)
            if(co==1)
                jump=co;
            else
                jump=co+1;
        }
        else
            i++;
    }
    if(jump==0)
        jump=2;
    printf("%d\n",jump);
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    int dif, maxdif, l, i, j, flag=0, firstbound, lastbound;
    char arr[101];
    scanf("%s", arr);
    l=strlen(arr);

    char indexcol[l];
    for(i=0,j=0;i<l;i++)
    {
        if(arr[i]=='A' || arr[i]=='E' || arr[i]=='I' || arr[i]=='O' || arr[i]=='U' || arr[i]=='Y')
        {
            indexcol[j]=i;
            flag=1;
            j++;
        }
    }
    maxdif=1;
    for(i=1;i<j;i++)
    {
        dif=indexcol[i]-indexcol[i-1];
        if(dif>maxdif) maxdif=dif;
    }
    firstbound=indexcol[0];
    lastbound=l-indexcol[j-1];
    if(lastbound<firstbound) lastbound=firstbound;
    if(maxdif>=lastbound && flag==1) printf("%d", maxdif);
    else if(maxdif<lastbound && flag==1) printf("%d", lastbound);
    else if(flag==0) printf("%d", l+1);
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

// 'A', 'E', 'I', 'O', 'U' and 'Y'.
#define is_vowel(c) ((c) == 'A' || (c) == 'E' || (c) == 'I' || (c) == 'O' \
        || (c) == 'U' || (c) == 'Y' )

int main() {
    char str[101];
    scanf("%s", str);

    int step = 1, i = 0, len = strlen(str);
    while (i < len && is_vowel(str[i])) i++;
    for (;i < len;) {
        if (is_vowel(str[i])) {
            step++;
            while (i < len && is_vowel(str[i])) i++;
        }
        while (i < len && !is_vowel(str[i])) i++;
    }
    printf("%d\n", step);
    return 0;
}

#include<stdio.h>
#include<string.h>
int  main(){
    int i,n,prev=0,max=0;
    char s[100];
    gets(s);
    n=strlen(s);
    for(i=0;i<n;i++){
    if(s[i]=='A' ||s[i]=='E' ||s[i]=='I' ||s[i]=='O' ||s[i]=='U'||s[i]=='Y'){
    if(i-prev>max){
    max=i-prev;
    }
        prev=i;
    }}

    printf("%d",max);
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

// 'A', 'E', 'I', 'O', 'U' and 'Y'.
#define is_vowel(c) ((c) == 'A' || (c) == 'E' || (c) == 'I' || (c) == 'O' \
        || (c) == 'U' || (c) == 'Y' )

int main() {
    char str[101];
    scanf("%s", str);

    int step = 1, i = 1, len = strlen(str);
    for (;i < len;) {
        if (is_vowel(str[i])) {
            if (!(i == 1 && is_vowel(str[0]))) step++;
            while (i < len && is_vowel(str[i])) i++;
        }
        while (i < len && !is_vowel(str[i])) i++;
    }
    printf("%d\n", step);
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

int notupper(char *ch) {

	 int i=0;
	while(i<strlen(ch)){
		if(ch[i]<65 ||ch[i]>91) {

		return 1;
		}
i++;	}

	return 0;
}

int main(){

char ch[10000];

 do{
gets(ch);
 }while (notupper(ch) ||*ch=='\n')  ;

int max=0,j=0;
int i;
for(  i=0;i<strlen(ch);i++){
	if (j>max){
        	max=j;

			}
	if(ch[i]=='I'||ch[i]=='Y'||ch[i]=='O'||ch[i]=='U'||ch[i]=='E'||ch[i]=='A')
	{

		j=1;

	}else{
		if(j!=0){
			j++;
		}

	}

}
if(max==0)
printf("%d",max+strlen(ch)+1);
else
printf("%d",max);

	return 0;
}

#include<stdio.h>
#include<string.h>
main()
{
    char a[105];
    int i,j,k,len,max=0,dis=0,start=0,end=0,flag=0;
    scanf("%s",a);
    len=strlen(a);
    for(i=0;i<len;i++)
    {
        if(a[i]=='A' || a[i]=='E' || a[i]=='I' || a[i]=='O' || a[i]=='U' || a[i]=='Y')
        {   end=i+1;
            dis=end-start;
            if(dis>max)max=dis;
            start=end;flag=1;
        }
    }
    if(flag==0)printf("%d\n",len+1);
    else printf("%d\n",max);
    return 0;

}

#include<stdio.h>
#include<string.h>

char a[101];
int d[101];

int v_c(char ch){
	switch(ch)
	{
			case 'A':
			case 'E':
			case 'I':
			case 'O':
			case 'U':
			case 'Y':
			case '\0':

				return 1;
					break;

			default:
			 return 0;
	}
}

int main(){
	fflush(stdin);
	gets(a);
	int i,j,alien = 2,dist = 0,temp = 0,k=0;
	for(i=0;i<strlen(a)-1;i++){
		temp = dist;
		char ch = a[i];
		if(v_c(ch)==1){
			for(j=i+1;j<strlen(a)+1;j++){
				char ch1 = a[j];
				if(v_c(ch1)==1){
					dist = j-i;
					d[k] = dist;
					k++;
					break;
				}
			}
		}
		else if(v_c(ch) == 0){
			alien++;
		}
	}

	int maximum = d[0],c;
  for (c = 1; c < 101; c++){
    if (d[c] > maximum){
       maximum  = d[c];
    }
  }

	if(maximum > 0){
		printf("%d",maximum);
	}
	else{
		printf("%d",alien);
	}

	return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char s[105];
int main()
{
    int n,i,last=-1,max=-1;
    gets(s);
    n=strlen(s);
    for(i=0;i<n;i++)
    {
        if(s[i]=='A' || s[i]=='E' || s[i]=='I' || s[i]=='O' || s[i]=='U' || s[i]=='Y')
        {
            if(i-last>max)
                max=i-last;
            last=i;
        }
    }
    printf("%d",max);
    return 0;
}

#include <stdio.h>
#include <math.h>
#include <string.h>
int main()
{
	char a[102];
	int n,i,arr[102],p,min=1;
	scanf("%s",a);
	n=strlen(a);
	p=0;
	for(i=0;i<n;i++)
	{
		if(a[i]=='A' | a[i]=='E' | a[i]=='I' | a[i]=='O' | a[i]=='U' | a[i]=='Y')
		{
			arr[p]=i;
			p++;
		}
	}
	for(i=1;i<p;i++)
	{
		if(arr[i]-arr[i-1]>=min)
			min=arr[i]-arr[i-1];
	}
	printf("%d\n",min);
	return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
    int dif, maxdif, l, i, j;
    char arr[101];
    scanf("%s", arr);
    l=strlen(arr);
    char indexcol[l];
    for(i=0,j=0;i<l;i++)
    {
        if(arr[i]=='A' || arr[i]=='E' || arr[i]=='I' || arr[i]=='O' || arr[i]=='U' || arr[i]=='Y')
        {
            indexcol[j]=i;
            j++;
        }
    }
    maxdif=1;
    for(i=1;i<j;i++)
    {
        dif=indexcol[i]-indexcol[i-1];
        if(dif>maxdif) maxdif=dif;
    }
    printf("%d", maxdif);
    return 0;
}

#include<stdio.h>
#define max(a,b) \
   ({ __typeof__ (a) _a = (a); \
       __typeof__ (b) _b = (b); \
     _a > _b ? _a : _b; })
int main(){
int l,jum=1,n;
char arr[100];
scanf("%s",&arr);
l=strlen(arr);
for(int i=0;i<l;i++){
    n=1;
    while(arr[i]!='A'&&arr[i]!='E'&&arr[i]!='I'&&arr[i]!='O'&&arr[i]!='U'){
     n++;
     i++;
     if(i==l)
     break;
    }
    if(n>jum)
        jum=n;
}
printf("%d\n",jum);
return 0;
}

#include <stdio.h>
#include <string.h>

int main(void){

  int jump=1;
  char string[115];
  int max_jump=1;

  scanf("%s", string);

  for(int i=0; i<strlen(string);i++){
    if(string[i]=='A' || string[i]=='E' || string[i]== 'I' || string[i] == 'O' || string[i] == 'U'){
      jump=1;
      continue;
    }
    jump+=1;
    if(max_jump<jump){
      max_jump=jump;
    }
  }

  printf("%d\n", max_jump);

}

#include <stdio.h>
int is_vowels(char carac);

int main(int argc, char const *argv[])
{
	int j,s=1,max = 1,i=0;
	char carac;
	while((j=scanf("%c",&carac) != EOF) && j != feof )
	{
    	i++;
    	if (is_vowels(carac) )
    	{
    		if(s > max) max = s;
    		s=1;
    	}
    	else s++;

	}

	if(i == 1 && s > max) max = s;
	printf("%d\n", max);
}
int is_vowels(char carac)
{
	if (carac == 'A' || carac == 'E' || carac == 'I' ||
		carac == 'O' || carac == 'U' || carac == 'Y' )
	return 1 ;
	return 0 ;
}

#include <Stdio.h>
#include <string.h>

int main() {
	char str[100];
	scanf("%s",str);
	int len=strlen(str);
	int ans=0;
	int i;
	int d;
	int current=-1;
	for(i=0;i<len;i++){
		if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||str[i]=='Y'){
			d=i-current;
		//	printf("ans=%d,d=%d\n",ans,d);
			if(d>ans){
				ans=d;
		//		printf("a=%d\n",ans);
			}
			current=i;
		}
	}
	printf("%d",ans);
}

#include<stdio.h>
#include<string.h>
int main()
{
	char string[101];
	scanf("%s",string);
	int len=strlen(string);
	int i;
	int x=0,maxJump=0;
	for(i=0;i<len;i++)
	{
		switch(string[i])
		{
			case 'A':
			case 'E':
			case 'I':
			case 'O':
			case 'U':
			case 'Y':
				if(i-x>maxJump)
					 maxJump=i-x;
				x=i;
				break;
			default:
				 break;
		}
	}

	printf("%d",maxJump);
	return 0;
}

//
//  733a.c
//
//
//  Created by Stefanus Anggara on 11/11/16.
//
//

#include <stdio.h>
#include <string.h>

int outputMax(int a, int b) {
    if (a > b) {
        return a;
    } else{
        return b;
    }
}

int main() {

    char input[109];
    int minJumpAbility = 0;
    int i, len, lastPost = -1;
    int distance;

    scanf("%s", input);
    len = strlen(input);
    for (i = 0; i < len ; i++) {
        if (input[i] == 'A' ||
            input[i] == 'E' ||
            input[i] == 'I' ||
            input[i] == 'O' ||
            input[i] == 'U' ||
            input[i] == 'Y') {
            distance = i - lastPost;
            minJumpAbility = outputMax(minJumpAbility, distance);
            lastPost = i;
        }
    }
    if (minJumpAbility == 0) {
        printf("2\n");
    } else {
        printf("%d\n", minJumpAbility);
    }

    return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int counter=-1,help=-1, last=-1;
    char str[101];
    scanf("%s",str);
    for(int i=0; i<strlen(str); i++)
    {
        if(str[i]=='A' || str[i]=='E' || str[i]=='I' || str[i]=='O' || str[i]=='U' || str[i]=='Y')
        {
            help=i;
            if(help-counter > last)
             {last=help-counter; counter=i;}
             else counter=i;
        }
    }
    if(last==-1) printf("%d", strlen(str)+1);
    else printf("%d", last);
    return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
    int i, n=1, temp=1,m;
    char A[101];
    gets(A);
    m=strlen(A);
    for(i=0;i<m;i++)
    {
        if(A[i]!='A'&&A[i]!='E'&&A[i]!='I'&&A[i]!='O'&&A[i]!='U')
        temp++;
        if(temp>n)
        n=temp;
        if(A[i]=='A'||A[i]=='E'||A[i]=='I'||A[i]=='O'||A[i]=='U')
        {temp=1;}
    }
    printf("%d",n);
    return 0;
}

#include<stdio.h>
#include<string.h>
int main(){
	int i,len,cnt=0,max=0;
	char s[100];
	scanf("%s",s);
	len=strlen(s);
	for(i=0;i<len;i++){
		++cnt;
		if(s[i]=='A'||s[i]=='E'||s[i]=='I'||s[i]=='O'||s[i]=='U'||s[i]=='Y'){
			if(cnt>max)
				max=cnt;
				cnt=0;
		}
	}
		if(cnt+1>max)
		max=cnt;
	printf("%d",max);
}

#include <stdio.h>
int main(void) {
  char s[105]; int m=1,curr=-1;
  scanf("%s",s);
  for (int i=0;s[i];i++)
    if (s[i]=='A'||s[i]=='E'||s[i]=='I'||s[i]=='O'||s[i]=='U') {
      if (i-curr>m) m=i-curr;
      curr=i;
    }
  printf("%d\n",m);
  return 0;
}

#include<stdio.h>
#include<string.h>
int  main(){
    int i,n,prev=0,max=1;
    char s[100];
    gets(s);
    n=strlen(s);
    for(i=0;i<n;i++){
    if(s[i]=='A' ||s[i]=='E' ||s[i]=='I' ||s[i]=='O' ||s[i]=='U'||s[i]=='Y' || s[i]=='\0'){
    if(i-prev>max){
    max=i-prev;
    }
        prev=i;
    }}

    printf("%d",max);
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int counter=-1,help=-1, last=-1, check=0, hello=0;
    char str[101];
    scanf("%s",str);
    for(int i=0; i<strlen(str); i++)
    {
        if(str[i]=='A' || str[i]=='E' || str[i]=='I' || str[i]=='O' || str[i]=='U' || str[i]=='Y')
        {
            help=i;
            if(help-counter > last)
             {last=help-counter; counter=i;}
             else counter=i;
            check++; hello=i;
        }
    }
    if(check==1) printf("%d", (strlen(str)-hello));
    else if(last==-1) printf("%d", strlen(str)+1);
    else printf("%d", last);
    return 0;
}

#include<stdio.h>
#include<string.h>
int vowel_consonant(char ch){
	switch(ch)
	{
			case 'A':
			case 'E':
			case 'I':
			case 'O':
			case 'U':
			case 'Y':
				return 1;
					break;

			default:
			 return 0;
	}
}
int main(){
	char a[110];
	fflush(stdin);
	gets(a);
	int i,count = -1;;
	for(i=0;i<strlen(a);i++){
		int ch0 = a[i], ch1 = a[i+1];
		if(vowel_consonant(ch0) == 1 && vowel_consonant(ch1) == 0){
			count++;
		}
	}
	int flag = 0;
	if(count>0){
		printf("%d",count);
	}
	else{
		for(i=0;i<strlen(a);i++){
			char c = a[i];
			if(vowel_consonant(c)==1){
				flag = 1;
			}
			else if(vowel_consonant(c)==0)
				flag = 2;
		}
		printf("%d",flag);
	}
	return 0;
}

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

int notupper(char *ch) {

	 int i=0;
	while(i<strlen(ch)){
		if(ch[i]<65 ||ch[i]>91) {

		return 1;
		}
i++;	}

	return 0;
}

int main(){

char ch[100];

 do{
gets(ch);
 }while (notupper(ch) ||*ch=='\n')  ;

int max=0,j=0;
int i;
for(  i=0;i<strlen(ch);i++){

	if(ch[i]=='I'||ch[i]=='Y'||ch[i]=='O'||ch[i]=='U'||ch[i]=='E'||ch[i]=='A')
	{

		j=1;

	}else{
		if(j!=0){
			j++;
		}

	}

		if (j>max){
        	max=j;

			}
}
printf("%d",max);

	return 0;
}

#include <stdio.h>
#include<string.h>

int main(void) {

	char s[100];
	scanf("%s", s);

	int i, jump=1, j=strlen(s), flag=0;
	for(i=strlen(s)-1; i>=0; i--) {
		if(s[i]=='A' || s[i]=='E' || s[i]=='I' || s[i]=='O' || s[i]=='U' || s[i]=='Y') {
			flag++;
			if((j-i)>jump) {jump =(j-i);}
			j=i;
		}
	}
	if(flag==0){ printf("%d", j); }
	else { printf("%d", jump); }
	return 0;
}

#include <stdio.h>
#include <string.h>

int main(){
	int max=0,size,cur=0;
	char s[120];
	scanf("%s",s);
	size = strlen(s);
	for(int i=0;i<size;i++){
		cur++;
		switch(s[i]){
			case 'A':
			case 'E':
			case 'I':
			case 'O':
			case 'U':
				if(cur>max)
					max=cur;
				cur=0;
				break;
			default:
				break;
		}
	}
	printf("%d",(cur>max)?cur:max);
	return 0;
}

#include<stdio.h>

main()
{
    int n,a=0,d=0,i,jump=0,max=0,flag=0,p;
    char s[100010];
    gets(s);
    n=strlen(s);
   // printf("%d\n",n);
     for(i=0;i<n;i++)
    {
        if(s[i]=='A' || s[i]=='E' || s[i]=='I' || s[i]=='O' || s[i]=='U' || s[i]=='Y' )
        {
            if(flag==0)
            {
                jump=i;
                max=jump;
                p=i;
                flag=1;

            }
            else
            {
                jump=i-p;
                if(jump>max) max=jump;
                p=i;

            }

        }

    }
    printf("%d\n",max);
    return 0;

}

#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
    int i,l,k=1,g=1;
    char S[101];
    gets(S);
    l=strlen(S);
    for(i=0;i<l;i++)
    {
        if(S[i]!='A'&&S[i]!='E'&&S[i]!='I'&&S[i]!='O'&&S[i]!='U')
        {
            k++;
            if(k>g)
            {
                g=k;
            }
        }
        else
        {
            k=1;
        }
    }
    printf("%d\n",g);
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
	char str[1000];
	gets(str);
	int max1,jk,i,max=0,x=0,j,n=0,m=0,len=strlen(str);
	for(i=0;i<len;i++)
	{
		if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||str[i]=='Y')
		{

			if(j==0)
			{
				n=i;
				j=1;
			}
			else
			{
				m=i;
				j=0;
			}
			if(m<n)
			{

				x=n-m;
			}
			else
			{
				x=m-n;
			}

			if(max<x)
			{
				max=x;
			}
		jk=i;
		}
	}
	max1=len-jk-1;
	if(max<max1)
	{
		max=max1;
	}
	printf("%d\n",max);

return 0;
}

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char ch[100];
    int i=0,nb=0,j,s=0,ca ;

    gets(ch);

        while(i<strlen(ch))
        {
            if(ch[i]=='A' || ch[i]=='E' || ch[i]=='I'|| ch[i]=='O' || ch[i]=='U' || ch[i]=='Y')

            {s=i+1;
            for(j=i;j<strlen(ch);j++)
            {

                if(ch[j]=='A' || ch[j]=='E' || ch[j]=='I'|| ch[j]=='O' || ch[j]=='U' || ch[j]=='Y')
                   {
                       nb=j-i;
                        i=j;
                   if (nb>s)

                    s=nb;

                   }

                   else
                    s=strlen(ch)-i;

            }

            }

             i++;
                 }

        printf("%d",s);
    return 0;
}

#include <stdio.h>
#include<string.h>

int main()
{
    int i,j=0,copy=0,sum[100],max;
    sum[0]=0;
    char st[100];
    scanf("%s",st);
    for(i=0;st[i]!='\0';i++)
    {
        if(st[i]=='A' || st[i]=='E' || st[i]=='I' || st[i]=='O' || st[i]=='U' || st[i]=='Y')
        {
            sum[j]=i-copy;
            copy=i;
            j++;
        }

    }
    sum[0]+=1;
    max=sum[0];
    sum[j]=i-copy;
    if(j==0)
        max+=sum[j];
    for(i=1;i<=j;i++)
    {
        if(max<sum[i])
            max=sum[i];
    }
    printf("%d",max);
    return 0;
}

#include <stdio.h>
#include <string.h>

int main ()
{
    char s[100];
    gets(s);
    int i,k=0,c,d=1;
    for(i=0;i<strlen(s);i++)
    {
        if(s[i]=='A' || s[i]=='E' || s[i]=='I' ||s[i]=='O' || s[i]=='U')
        {
            k=0;
        }
        else {k++;
           c=k;
           if(c>d) d=c;
        }
    }
    if(d==1)printf("%d",1);
    else
    printf("%d",d+1);
    return 0;
}

#include<stdio.h>
#include<stdlib.h>

int main()
{
    char n[100],vowels[6]={'A','E','I','O','U','Y'};
    int c=0,res=0;
    scanf("%s", &n);
    for(int i=0; i<strlen(n); i++){
        for(int j=0; j<6; j++){
            if(n[i]==vowels[j]){
                if(i-c+1>res){
                    res=i-c+1;
                }
                c=i+1;
                break;
            }
        }
    }
    if(strlen(n)-c+1>=res){
        res=strlen(n)-c+1;
        printf("%i", res);
    }
    return 0;
};

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
main()
{
    int a,n,l=0,r,dis=0,max=0,i;
    char al[200];
    gets(al);
    for(i=0;i<strlen(al);i++)
    {
        if(al[i]=='A'||al[i]=='E'||al[i]=='O'||al[i]=='U'||al[i]=='I'||al[i]=='Y')
        {
            dis=(i-l);
            l=i;
        }
        if(dis>max)max=dis;
    }
    printf("%d",max);
}

#include<stdio.h>
#include<string.h>
main()
{
   char s[105];
   int i,l,jump=0,max=0,pos=0;
   scanf("%s",s);
   l=strlen(s);
   for(i=1;i<=l;i++)
   {
       if(s[i-1]=='A' || s[i-1]=='E' || s[i-1]=='I' || s[i-1]=='O' || s[i-1]=='U' || s[i-1]=='Y' )
       {
               jump=i-pos;
                pos=i;
               if(jump>max)
               {
                   max=jump;
                   if(i==l)
                    max+=1;
               }
       }
      else if(i==l)
       {
           jump=i-pos;
           if(jump>=max)
            max=jump+1;
       }

   }
   printf("%d\n",max);
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
	char str[101];
	scanf("%s",str);
	int i,j;
	int max=0;

	for(i=0;i<strlen(str);i++)
	{

		for(j=i+1;j<strlen(str);j++)
		{
			if(str[j]=='A'||str[j]=='E'||str[j]=='I'||str[j]=='O'||str[j]=='U'||str[j]=='Y')
			{
				if(j-i>max)max=j-i;
				break;
			}
		}
	}
	printf("%d",max);
}

#include<stdio.h>
#include<string.h>
main()
{
   char s[105];
   int i,l,jump=0,max=0,pos=0;
   scanf("%s",s);
   l=strlen(s);
   for(i=1;i<=l;i++)
   {
       if(s[i-1]=='A' || s[i-1]=='E' || s[i-1]=='I' || s[i-1]=='O' || s[i-1]=='U' || s[i-1]=='Y' )
       {
               jump=i-pos;
                pos=i;
               if(jump>max)
                max=jump;
       }

   }
   printf("%d\n",max);
    return 0;
}

#include<stdio.h>
int main()
{
    char s[200];
    int a=-1,count=0,max=0,i;
    scanf("%s",s);
    for(i=0;i<strlen(s);i++){
        if(s[i]=='A'||s[i]=='E'||s[i]=='I'||s[i]=='O'||s[i]=='U'){
            count=i-a;
            if(max<count)
                max=count;
            a=i;
        }
    }
    printf("%d\n",max);
    return 0;
}


#include <stdio.h>

const unsigned char N = (unsigned char) 10;

unsigned char n;
int x;
unsigned char mat[10][10];

 unsigned char smin(const unsigned char a, const unsigned char b) { return a < b ? a : b; }
 unsigned char smax(const unsigned char a, const unsigned char b) { return a > b ? a : b; }

unsigned char FOR4(const unsigned char k, const unsigned char i, const unsigned char j)  {
    mat[i][j] = smin(mat[i][j], mat[i][k] + mat[k][j]);
    return j + 1 < n ? FOR4(k, i, j + 1) :
                i + 1 < n ? FOR4(k, i + 1, 0) :
                k + 1 < n ? FOR4(k + 1, 0, 0) : 0;
}

 unsigned char FOR_INPUT2(const unsigned char i, const unsigned char j) {
    scanf("%d", &x);
    mat[i][j] = x;
    return j + 1 < n ? FOR_INPUT2(i, j + 1) : 0;
}

 unsigned char FOR_INPUT1(const unsigned char i) {
    FOR_INPUT2(i, 0);
    return i + 1 < n ? FOR_INPUT1(i + 1) : 0;
}

 unsigned char BILLY2(const unsigned char i, const unsigned char j) {
    return smax(mat[i][j], j + 1 < n ? BILLY2(i, j + 1) : 0);
}

 unsigned char BILLY1(const unsigned char i) {
    unsigned char ans = BILLY2(i, 0);
    unsigned char other = i + 1 < n ? BILLY1(i + 1) : 0;
    return smax(ans, other);
}

void solve() {
    scanf("%d", &x); n = x;
    FOR_INPUT1(0);
    // FOR1(0);
    FOR4(0, 0, 0);
    printf("%d\n", BILLY1(0));
}

int main() {
    solve();
    return 0;
}

#include<stdio.h>
int n, arr[20][20], ma=-1;
int scan(int x)
{
    scanf("%d", &arr[x/n][x%n]);
    return x=x<n*n-1?scan(x+1):0;
}
int solve(int x)
{
    int i, j, k;
    k=(x/n)/n;//00001111
    i=(x/n)%n;//00110011
    j=(x%n);//01010101
    arr[i][j]=arr[i][j]>arr[i][k]+arr[k][j]?arr[i][k]+arr[k][j]:arr[i][j];
    return x=x<n*n*n-1?solve(x+1):0;
}
int get_max(int x)
{
    int i, j;
    i=x/n;
    j=x%n;
    ma=arr[i][j]>ma?arr[i][j]:ma;
    return x<n*n-1?get_max(x+1):0;
}
int main()
{
    int i, j;
    scanf("%d", &n);
    scan(0);
    solve(0);
    get_max(0);
    printf("%d", ma);
}

#include <stdio.h>

const int oo = (int)1e9;
int n;
int d[10][10];
int ans = 0;

int poop1(int i, int j)
{
	return i == n ? 0 : (
		j == n ? poop1(i + 1, 0) : (
			scanf("%d", &d[i][j]) + poop1(i, j + 1)
		)
	);
}

int poop2(int i, int j, int k)
{
	return k == n ? 0 : (
		i == n ? poop2(0, 0, k + 1) : (
			j == n ? poop2(i + 1, 0, k) : (
				(d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j])
				+ poop2(i, j + 1, k)
			)
		)
	);
}

int poop3(int i, int j)
{
	return i == n ? 0 :  (
		j == n ? poop3(i + 1, 0) : (
			(ans = ans < d[i][j] ? d[i][j] : ans) + poop3(i, j + 1)
		)
	);
}

int main()
{
	scanf("%d", &n);

	poop1(0, 0);
	poop2(0, 0, 0);
	poop3(0, 0);

	printf("%d\n", ans);

	return 0;
}

#include <stdio.h>

const unsigned char N = (unsigned char) 10;

unsigned char n;
int x;
int mat[10][10];

 unsigned char smin(const unsigned char a, const unsigned char b) { return a < b ? a : b; }
 unsigned char smax(const unsigned char a, const unsigned char b) { return a > b ? a : b; }

 unsigned char FOR3(const unsigned char k, const unsigned char i, const unsigned char j) {
    mat[i][j] = smin(mat[i][j], mat[i][k] + mat[k][j]);
    return j + 1 < n ? FOR3(k, i, j + 1) : 0;
}

 unsigned char FOR2(const unsigned char i, const unsigned char j) {
    FOR3(i, j, 0);
    return j + 1 < n ? FOR2(i, j + 1) : 0;
}

 unsigned char FOR1(const unsigned char i) {
    FOR2(i, 0);
    return i + 1 < n ? FOR1(i + 1) : 0;
}

 unsigned char FOR_INPUT2(const unsigned char i, const unsigned char j) {
    scanf("%d", &x);
    mat[i][j] = x;
    return j + 1 < n ? FOR_INPUT2(i, j + 1) : 0;
}

 unsigned char FOR_INPUT1(const unsigned char i) {
    FOR_INPUT2(i, 0);
    return i + 1 < n ? FOR_INPUT1(i + 1) : 0;
}

 unsigned char BILLY2(const unsigned char i, const unsigned char j) {
    return smax(mat[i][j], j + 1 < n ? BILLY2(i, j + 1) : 0);
}

 unsigned char BILLY1(const unsigned char i) {
    unsigned char ans = BILLY2(i, 0);
    unsigned char other = i + 1 < n ? BILLY1(i + 1) : 0;
    return smax(ans, other);
}

void solve() {
    scanf("%d", &x); n = x;
    FOR_INPUT1(0);
    FOR1(0);
    printf("%d\n", BILLY1(0));
}

int main() {
    solve();
    return 0;
}

#include <stdio.h>

const short N = (short) 10;

short n;
int x;
short mat[10][10];

 short smin(const short a, const short b) { return a < b ? a : b; }
 short smax(const short a, const short b) { return a > b ? a : b; }

 short FOR3(const short k, const short i, const short j) {
    mat[i][j] = smin(mat[i][j], mat[i][k] + mat[k][j]);
    return j + 1 < n ? FOR3(k, i, j + 1) : 0;
}

 short FOR2(const short i, const short j) {
    FOR3(i, j, 0);
    return j + 1 < n ? FOR2(i, j + 1) : 0;
}

 short FOR1(const short i) {
    FOR2(i, 0);
    return i + 1 < n ? FOR1(i + 1) : 0;
}

 short FOR_INPUT2(const short i, const short j) {
    scanf("%d", &x);
    mat[i][j] = x;
    return j + 1 < n ? FOR_INPUT2(i, j + 1) : 0;
}

 short FOR_INPUT1(const short i) {
    FOR_INPUT2(i, 0);
    return i + 1 < n ? FOR_INPUT1(i + 1) : 0;
}

 short BILLY2(const short i, const short j) {
    return smax(mat[i][j], j + 1 < n ? BILLY2(i, j + 1) : 0);
}

 short BILLY1(const short i) {
    short ans = BILLY2(i, 0);
    short other = i + 1 < n ? BILLY1(i + 1) : 0;
    return smax(ans, other);
}

void solve() {
    scanf("%d", &x); n = x;
    FOR_INPUT1(0);
    FOR1(0);
    printf("%d\n", BILLY1(0));
}

int main() {
    solve();
    return 0;
}

#include <stdio.h>

const short N = (short) 10;

short n;
short mat[10][10];

 short smin(const short a, const short b) { return a < b ? a : b; }
 short smax(const short a, const short b) { return a > b ? a : b; }

 short FOR3(const short k, const short i, const short j) {
    mat[i][j] = smin(mat[i][j], mat[i][k] + mat[k][j]);
    return j + 1 < n ? FOR3(k, i, j + 1) : 0;
}

 short FOR2(const short i, const short j) {
    FOR3(i, j, 0);
    return j + 1 < n ? FOR2(i, j + 1) : 0;
}

 short FOR1(const short i) {
    FOR2(i, 0);
    return i + 1 < n ? FOR1(i + 1) : 0;
}

 short FOR_INPUT2(const short i, const short j) {
    scanf("%hd", &mat[i][j]);
    return j + 1 < n ? FOR_INPUT2(i, j + 1) : 0;
}

 short FOR_INPUT1(const short i) {
    FOR_INPUT2(i, 0);
    return i + 1 < n ? FOR_INPUT1(i + 1) : 0;
}

 short BILLY2(const short i, const short j) {
    return smax(mat[i][j], j + 1 < n ? BILLY2(i, j + 1) : 0);
}

 short BILLY1(const short i) {
    short ans = BILLY2(i, 0);
    short other = i + 1 < n ? BILLY1(i + 1) : 0;
    return smax(ans, other);
}

void solve() {
    scanf("%hd", &n);
    FOR_INPUT1(0);
    FOR1(0);
    printf("%d\n", BILLY1(0));
}

int main() {
    solve();
    return 0;
}

#include <stdio.h>

const unsigned char N = (unsigned char) 10;

unsigned char n;
int x;
unsigned char mat[10][10];

 unsigned char smin(const unsigned char a, const unsigned char b) { return a < b ? a : b; }
 unsigned char smax(const unsigned char a, const unsigned char b) { return a > b ? a : b; }

 unsigned char FOR3(const unsigned char k, const unsigned char i, const unsigned char j) {
    mat[i][j] = smin(mat[i][j], mat[i][k] + mat[k][j]);
    return j + 1 < n ? FOR3(k, i, j + 1) : 0;
}

 unsigned char FOR2(const unsigned char i, const unsigned char j) {
    FOR3(i, j, 0);
    return j + 1 < n ? FOR2(i, j + 1) : 0;
}

 unsigned char FOR1(const unsigned char i) {
    FOR2(i, 0);
    return i + 1 < n ? FOR1(i + 1) : 0;
}

 unsigned char FOR_INPUT2(const unsigned char i, const unsigned char j) {
    scanf("%d", &x);
    mat[i][j] = x;
    return j + 1 < n ? FOR_INPUT2(i, j + 1) : 0;
}

 unsigned char FOR_INPUT1(const unsigned char i) {
    FOR_INPUT2(i, 0);
    return i + 1 < n ? FOR_INPUT1(i + 1) : 0;
}

 unsigned char BILLY2(const unsigned char i, const unsigned char j) {
    return smax(mat[i][j], j + 1 < n ? BILLY2(i, j + 1) : 0);
}

 unsigned char BILLY1(const unsigned char i) {
    unsigned char ans = BILLY2(i, 0);
    unsigned char other = i + 1 < n ? BILLY1(i + 1) : 0;
    return smax(ans, other);
}

void solve() {
    scanf("%d", &x); n = x;
    FOR_INPUT1(0);
    FOR1(0);
    printf("%d\n", BILLY1(0));
}

int main() {
    solve();
    return 0;
}

#include <stdio.h>

const unsigned char N = (unsigned char) 10;

unsigned char n;
unsigned char mat[10][10];

 unsigned char smin(const unsigned char a, const unsigned char b) { return a < b ? a : b; }
 unsigned char smax(const unsigned char a, const unsigned char b) { return a > b ? a : b; }

unsigned char FOR4(const unsigned char k, const unsigned char i, const unsigned char j)  {
    mat[i][j] = smin(mat[i][j], mat[i][k] + mat[k][j]);
    return j + 1 < n ? FOR4(k, i, j + 1) :
                i + 1 < n ? FOR4(k, i + 1, 0) :
                k + 1 < n ? FOR4(k + 1, 0, 0) : 0;
}

 unsigned char FOR_INPUT2(const unsigned char i, const unsigned char j) {
    scanf("%d", &mat[i][j]);
    return j + 1 < n ? FOR_INPUT2(i, j + 1) : 0;
}

 unsigned char FOR_INPUT1(const unsigned char i) {
    FOR_INPUT2(i, 0);
    return i + 1 < n ? FOR_INPUT1(i + 1) : 0;
}

 unsigned char BILLY2(const unsigned char i, const unsigned char j) {
    return smax(mat[i][j], j + 1 < n ? BILLY2(i, j + 1) : 0);
}

 unsigned char BILLY1(const unsigned char i) {
    unsigned char ans = BILLY2(i, 0);
    unsigned char other = i + 1 < n ? BILLY1(i + 1) : 0;
    return smax(ans, other);
}

void solve() {
    scanf("%d", &n);
    FOR_INPUT1(0);
    // FOR1(0);
    FOR4(0, 0, 0);
    printf("%d\n", BILLY1(0));
}

int main() {
    solve();
    return 0;
}