#include<stdio.h>
#include<math.h>
#include<conio.h>
fun(int x)
{
int n,i;
for(n=x; ;n++)
{
for(i=2;i<=n/2;i++)
{if(n%i==0)
break;
}
if(i>21)
return n;
}
}
main()
{
int m;
FILE*fp;
if((fp=fopen("myf2.out","w"))==NULL)
{
printf("cannot open the file!\n");
exit(0);
}
scanf("%d",&m);
m=fun(m);
fprintf(fp,"%4d",m);
fprintf(fp,"\nmy exam num is 123456.\n");
fclose(fp);
getch();
}