#include<iostream> using namespace std; int main() { int n,i,ok,d,gasit; cin>>n; gasit=0; i=n+1; while(!gasit) { ok=1; if(i==0 || i==1) ok=0; else for(d=2;d<=i/2;d++) if(i%d==0) ok=0; if(ok) gasit=1; else i++; } cout<<i; system("pause"); return 0; }