stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <bits/stdc++.h>

#define sz 200009

using namespace std;

typedef long long ll;

int vis[sz+7];

void sieve()

{

  ll i,j;

  vis[0]=vis[1]=1;

  for (i=4; i<=sz; i+=2) vis[i]=1;



  for(i=3; i<=sz; i+=2)

  {

     if (vis[i]==0)

     {

       for (j=i*i; j<=sz; j+=i) vis[j]=1;

     }

  }

}

int main()

{

  sieve();



  int i,n=0;

  cin>>n;

  for(i=n; ; i++)

  {

  	if(vis[i]==0) {

  		cout<<i<<endl;

  		break;

  	}

  }

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.179260617951607x):
#include<bits/stdc++.h>

#define     sc(a)       scanf("%d",&a)

#define     sc2(a,b)    scanf("%d%d",&a,&b)

#define     line        "\n"

#define     space       " "

#define     MAX         100010

#define     MOD         1000000007

#define     Q           int nn ; scanf("%d",&nn); for (int xx=0;xx<nn;xx++)

#define     ff          first

#define     ss          second

#define     pf(a)       printf("%d\n",a)

#define     pfs(a)      printf("%d ",a)

#define     pf2(a,b)    printf("%d %d\n",a,b)

#define     itm(it)     map<int,int>:: iterator it

#define     its(it)     set<int>:: iterator it

#define     ac_sort(v)  sort(v.begin(),v.end())

#define     dc_sort(v)  sort(v.rbegin(),v.rend())

typedef long long lld;

using namespace std;

int main()

{

    int n ; sc(n);

    bool f =0, flag =0;

    while (n){

        for (int x=2;x*x<=n;x++){

            if (n%x==0) flag=1;

        }

        if (flag==0){

            break;

        }

        else flag=0,n++;

    }

    pf(n);

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define sz 200009

using namespace std;

typedef long long ll;

int vis[sz+7];

void sieve()

{

  ll i,j;

  vis[0]=vis[1]=1;

  for (i=4; i<=sz; i+=2) vis[i]=1;



  for(i=3; i<=sz; i+=2)

  {

     if (vis[i]==0)

     {

       for (j=i*i; j<=sz; j+=i) vis[j]=1;

     }

  }

}

int main()

{

  sieve();



  int i,n=0;

  cin>>n;

  for(i=n; ; i++)

  {

  	if(vis[i]==0) {

  		cout<<i<<endl;

  		break;

  	}

  }

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.7542497213106611x):
#include<iostream>

#include<string>

#include<algorithm>

#include<cstdlib>

#include<stack>

#include<queue>

#include<vector>

using namespace std;

bool arr[100100];

vector<long long int>v;

void sieve()

{

    long long int a, b, c, i, j, k;

    v.push_back(2);

    for (i = 3; i * i <= 100050; i = i + 2)

    {

        if (arr[i] == false)

        {

            v.push_back(i);

            for (j = i * i; j <= 100050; j = j + i)

            {

                arr[j] = true;

            }

        }

    }

    for (; i <= 100050; i = i + 2)

    {

        if (arr[i] == false)

            v.push_back(i);

    }



}

int main()

{

	long long int a, b, c, d, i, j, k, m, l, t;

    sieve();

    cin >> a;

    l = 0;

    long long int h = v.size() - 1;

   auto it= lower_bound(v.begin(), v.end(), a);

   b = it - v.begin();

   cout << v[b] << endl;

  

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define n 200005

using namespace std;

vector<long long >v(n,0);

vector<long long >prime;

long long i,j;

void sieve()

{

    for(i=3; i*i<=n; i+=2)

    {

        for(j=i*i; j<=n; j+=(i+i))

        {

            v[j-1]=1;

        }

    }

    prime.push_back(2);

    for(i=3; i<n; i+=2)

    {

        if(v[i-1]==0)

        {

            //cout<<i<<endl;

            prime.push_back(i);

        }

    }

}

int main()

{

    sieve();

    long long num,t;

    cin>>num;

    for(i=0;i<n;i++)

    {

        if(prime[i]>=num)

        {

            cout<<prime[i]<<endl;

            break;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 3.575410976449407x):
#include<iostream>

#include<string>

#include<algorithm>

#include<cstdlib>

#include<stack>

#include<queue>

#include<vector>

using namespace std;

bool arr[100100];

vector<long long int>v;

void sieve()

{

    long long int a, b, c, i, j, k;

    v.push_back(2);

    for (i = 3; i * i <= 100050; i = i + 2)

    {

        if (arr[i] == false)

        {

            v.push_back(i);

            for (j = i * i; j <= 100050; j = j + i)

            {

                arr[j] = true;

            }

        }

    }

    for (; i <= 100050; i = i + 2)

    {

        if (arr[i] == false)

            v.push_back(i);

    }



}

int main()

{

	long long int a, b, c, d, i, j, k, m, l, t;

    sieve();

    cin >> a;

    l = 0;

    long long int h = v.size() - 1;

   auto it= lower_bound(v.begin(), v.end(), a);

   b = it - v.begin();

   cout << v[b] << endl;

  

    return 0;

}
// Slower C++ solution:
//

// Created by Mahmoud Rashad on 11/27/19.

//



#include <bits/stdc++.h>





using namespace std;



typedef vector<int> vi;

typedef pair<int, int> ii;

typedef vector<pair<ii, ii>> vii;



void sieve(vector<bool> &isPrime, int n) {

    isPrime.resize(n + 1, true);

    isPrime[0] = isPrime[1] = false;

    for (int i = 2; i * i <= n; ++i) {

        if (isPrime[i]) {

            for (int j = i * i; j <= n; j += i) {

                isPrime[j] = false;

            }

        }

    }

}



int main() {

#ifndef ONLINE_JUDGE

//    freopen("input.txt", "r", stdin);

//    freopen("output.out", "w", stdout);

#endif

    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0), cout.precision(10), cout << fixed;



    vector<bool> isPrime;

    sieve(isPrime, 200005);

    int x;

    cin >> x;

    while(true) {

        if (isPrime[x]) {

            cout << x << '\n';

            return 0;

        }

        ++x;

    }



}

// Faster C++ solution for the same problem (measured speedup: 1.6131271549839132x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int x,i,flag;

    cin>>x;

    while(1)

    {

        flag=0;

        if(x==2)

        {

            cout<<x;

            break;

        }

        for(i=2; i<=sqrt(x); i++)

        {

            if(x%i==0)

            {

                flag=1;

                break;

            }



        }

        if(flag==0)

        {

            cout<<x;

            break;

        }

        else

            x++;



    }

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;

const int N=2e5+5,mod=1e9+7;

#define ll long long

bool vis[N];

int a[N];

int main()

{

    ios_base::sync_with_stdio(0);

    cin.tie(0);cout.tie(0);

    int n;

    cin>>n;

    for(ll i=2;i<N;i++)if(!vis[i])

    {

        if(i>=n) return cout<<i<<endl,0;

        for(ll j=i*i;j<N;j+=i)

            vis[j]=1;

    }



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.7324378339442408x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int x,i,flag;

    cin>>x;

    while(1)

    {

        flag=0;

        if(x==2)

        {

            cout<<x;

            break;

        }

        for(i=2; i<=sqrt(x); i++)

        {

            if(x%i==0)

            {

                flag=1;

                break;

            }



        }

        if(flag==0)

        {

            cout<<x;

            break;

        }

        else

            x++;



    }

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define sz 200009

using namespace std;

typedef long long ll;

int vis[sz+7];

void sieve()

{

  ll i,j;

  vis[0]=vis[1]=1;

  for (i=4; i<=sz; i+=2) vis[i]=1;



  for(i=3; i<=sz; i+=2)

  {

     if (vis[i]==0)

     {

       for (j=i*i; j<=sz; j+=i) vis[j]=1;

     }

  }

}

int main()

{

  sieve();



  int i,n=0;

  cin>>n;

  for(i=n; ; i++)

  {

  	if(vis[i]==0) {

  		cout<<i<<endl;

  		break;

  	}

  }

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.1514514562332496x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int x,i,flag;

    cin>>x;

    while(1)

    {

        flag=0;

        if(x==2)

        {

            cout<<x;

            break;

        }

        for(i=2; i<=sqrt(x); i++)

        {

            if(x%i==0)

            {

                flag=1;

                break;

            }



        }

        if(flag==0)

        {

            cout<<x;

            break;

        }

        else

            x++;



    }

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define n 200005

using namespace std;

vector<long long >v(n,0);

vector<long long >prime;

long long i,j;

void sieve()

{

    for(i=3; i*i<=n; i+=2)

    {

        for(j=i*i; j<=n; j+=(i+i))

        {

            v[j-1]=1;

        }

    }

    prime.push_back(2);

    for(i=3; i<n; i+=2)

    {

        if(v[i-1]==0)

        {

            //cout<<i<<endl;

            prime.push_back(i);

        }

    }

}

int main()

{

    sieve();

    long long num,t;

    cin>>num;

    for(i=0;i<n;i++)

    {

        if(prime[i]>=num)

        {

            cout<<prime[i]<<endl;

            break;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 6.42310726430973x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int x,i,flag;

    cin>>x;

    while(1)

    {

        flag=0;

        if(x==2)

        {

            cout<<x;

            break;

        }

        for(i=2; i<=sqrt(x); i++)

        {

            if(x%i==0)

            {

                flag=1;

                break;

            }



        }

        if(flag==0)

        {

            cout<<x;

            break;

        }

        else

            x++;



    }

}
// Slower C++ solution:
#include<iostream>

#include<string>

#include<algorithm>

#include<cstdlib>

#include<stack>

#include<queue>

#include<vector>

using namespace std;

bool arr[100100];

vector<long long int>v;

void sieve()

{

    long long int a, b, c, i, j, k;

    v.push_back(2);

    for (i = 3; i * i <= 100050; i = i + 2)

    {

        if (arr[i] == false)

        {

            v.push_back(i);

            for (j = i * i; j <= 100050; j = j + i)

            {

                arr[j] = true;

            }

        }

    }

    for (; i <= 100050; i = i + 2)

    {

        if (arr[i] == false)

            v.push_back(i);

    }



}

int main()

{

	long long int a, b, c, d, i, j, k, m, l, t;

    sieve();

    cin >> a;

    l = 0;

    long long int h = v.size() - 1;

   auto it= lower_bound(v.begin(), v.end(), a);

   b = it - v.begin();

   cout << v[b] << endl;

  

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.7964668416071858x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int x,i,flag;

    cin>>x;

    while(1)

    {

        flag=0;

        if(x==2)

        {

            cout<<x;

            break;

        }

        for(i=2; i<=sqrt(x); i++)

        {

            if(x%i==0)

            {

                flag=1;

                break;

            }



        }

        if(flag==0)

        {

            cout<<x;

            break;

        }

        else

            x++;



    }

}
// Slower C++ solution:
//

// Created by Mahmoud Rashad on 11/27/19.

//



#include <bits/stdc++.h>





using namespace std;



typedef vector<int> vi;

typedef pair<int, int> ii;

typedef vector<pair<ii, ii>> vii;



void sieve(vector<bool> &isPrime, int n) {

    isPrime.resize(n + 1, true);

    isPrime[0] = isPrime[1] = false;

    for (int i = 2; i * i <= n; ++i) {

        if (isPrime[i]) {

            for (int j = i * i; j <= n; j += i) {

                isPrime[j] = false;

            }

        }

    }

}



int main() {

#ifndef ONLINE_JUDGE

//    freopen("input.txt", "r", stdin);

//    freopen("output.out", "w", stdout);

#endif

    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0), cout.precision(10), cout << fixed;



    vector<bool> isPrime;

    sieve(isPrime, 200005);

    int x;

    cin >> x;

    while(true) {

        if (isPrime[x]) {

            cout << x << '\n';

            return 0;

        }

        ++x;

    }



}

// Faster C++ solution for the same problem (measured speedup: 1.6099309169788216x):
#include<bits/stdc++.h>

#include<string.h>

#include<cstring>

#define pb push_back

#define FAST ios::sync_with_stdio(0);cin.tie(),cout.tie();

typedef long long ll;

const long double pi = acos(-1.0);

const int mod = 1e9+7;

using namespace std;

 int is_prime(int n)

 {

     int i, root;

     if(n == 2) {

         return 1;

     }

     if(n % 2 == 0) {

         return 0;

     }

     root = sqrt(n);

     for(i = 3; i <= root; i = i + 2) {

         if(n % i == 0) {

             return 0;

         }

     }

     return 1;

 }



 int main()

 {

     int n, m,i;

         scanf("%d", &n);

         for( i=n;;i++)

         {

             if(is_prime(i))

                break;

         }



     cout<<i<<endl;

     return 0;

 }
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;

const int N=2e5+5,mod=1e9+7;

#define ll long long

bool vis[N];

int a[N];

int main()

{

    ios_base::sync_with_stdio(0);

    cin.tie(0);cout.tie(0);

    int n;

    cin>>n;

    for(ll i=2;i<N;i++)if(!vis[i])

    {

        if(i>=n) return cout<<i<<endl,0;

        for(ll j=i*i;j<N;j+=i)

            vis[j]=1;

    }



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.729005194657745x):
#include<bits/stdc++.h>

#include<string.h>

#include<cstring>

#define pb push_back

#define FAST ios::sync_with_stdio(0);cin.tie(),cout.tie();

typedef long long ll;

const long double pi = acos(-1.0);

const int mod = 1e9+7;

using namespace std;

 int is_prime(int n)

 {

     int i, root;

     if(n == 2) {

         return 1;

     }

     if(n % 2 == 0) {

         return 0;

     }

     root = sqrt(n);

     for(i = 3; i <= root; i = i + 2) {

         if(n % i == 0) {

             return 0;

         }

     }

     return 1;

 }



 int main()

 {

     int n, m,i;

         scanf("%d", &n);

         for( i=n;;i++)

         {

             if(is_prime(i))

                break;

         }



     cout<<i<<endl;

     return 0;

 }
// Slower C++ solution:
#include <bits/stdc++.h>

#define sz 200009

using namespace std;

typedef long long ll;

int vis[sz+7];

void sieve()

{

  ll i,j;

  vis[0]=vis[1]=1;

  for (i=4; i<=sz; i+=2) vis[i]=1;



  for(i=3; i<=sz; i+=2)

  {

     if (vis[i]==0)

     {

       for (j=i*i; j<=sz; j+=i) vis[j]=1;

     }

  }

}

int main()

{

  sieve();



  int i,n=0;

  cin>>n;

  for(i=n; ; i++)

  {

  	if(vis[i]==0) {

  		cout<<i<<endl;

  		break;

  	}

  }

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.1452071940345174x):
#include<bits/stdc++.h>

#include<string.h>

#include<cstring>

#define pb push_back

#define FAST ios::sync_with_stdio(0);cin.tie(),cout.tie();

typedef long long ll;

const long double pi = acos(-1.0);

const int mod = 1e9+7;

using namespace std;

 int is_prime(int n)

 {

     int i, root;

     if(n == 2) {

         return 1;

     }

     if(n % 2 == 0) {

         return 0;

     }

     root = sqrt(n);

     for(i = 3; i <= root; i = i + 2) {

         if(n % i == 0) {

             return 0;

         }

     }

     return 1;

 }



 int main()

 {

     int n, m,i;

         scanf("%d", &n);

         for( i=n;;i++)

         {

             if(is_prime(i))

                break;

         }



     cout<<i<<endl;

     return 0;

 }
// Slower C++ solution:
#include<bits/stdc++.h>

#define n 200005

using namespace std;

vector<long long >v(n,0);

vector<long long >prime;

long long i,j;

void sieve()

{

    for(i=3; i*i<=n; i+=2)

    {

        for(j=i*i; j<=n; j+=(i+i))

        {

            v[j-1]=1;

        }

    }

    prime.push_back(2);

    for(i=3; i<n; i+=2)

    {

        if(v[i-1]==0)

        {

            //cout<<i<<endl;

            prime.push_back(i);

        }

    }

}

int main()

{

    sieve();

    long long num,t;

    cin>>num;

    for(i=0;i<n;i++)

    {

        if(prime[i]>=num)

        {

            cout<<prime[i]<<endl;

            break;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 6.410380567914137x):
#include<bits/stdc++.h>

#include<string.h>

#include<cstring>

#define pb push_back

#define FAST ios::sync_with_stdio(0);cin.tie(),cout.tie();

typedef long long ll;

const long double pi = acos(-1.0);

const int mod = 1e9+7;

using namespace std;

 int is_prime(int n)

 {

     int i, root;

     if(n == 2) {

         return 1;

     }

     if(n % 2 == 0) {

         return 0;

     }

     root = sqrt(n);

     for(i = 3; i <= root; i = i + 2) {

         if(n % i == 0) {

             return 0;

         }

     }

     return 1;

 }



 int main()

 {

     int n, m,i;

         scanf("%d", &n);

         for( i=n;;i++)

         {

             if(is_prime(i))

                break;

         }



     cout<<i<<endl;

     return 0;

 }
// Slower C++ solution:
#include<iostream>

#include<string>

#include<algorithm>

#include<cstdlib>

#include<stack>

#include<queue>

#include<vector>

using namespace std;

bool arr[100100];

vector<long long int>v;

void sieve()

{

    long long int a, b, c, i, j, k;

    v.push_back(2);

    for (i = 3; i * i <= 100050; i = i + 2)

    {

        if (arr[i] == false)

        {

            v.push_back(i);

            for (j = i * i; j <= 100050; j = j + i)

            {

                arr[j] = true;

            }

        }

    }

    for (; i <= 100050; i = i + 2)

    {

        if (arr[i] == false)

            v.push_back(i);

    }



}

int main()

{

	long long int a, b, c, d, i, j, k, m, l, t;

    sieve();

    cin >> a;

    l = 0;

    long long int h = v.size() - 1;

   auto it= lower_bound(v.begin(), v.end(), a);

   b = it - v.begin();

   cout << v[b] << endl;

  

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.792907335726765x):
#include<bits/stdc++.h>

#include<string.h>

#include<cstring>

#define pb push_back

#define FAST ios::sync_with_stdio(0);cin.tie(),cout.tie();

typedef long long ll;

const long double pi = acos(-1.0);

const int mod = 1e9+7;

using namespace std;

 int is_prime(int n)

 {

     int i, root;

     if(n == 2) {

         return 1;

     }

     if(n % 2 == 0) {

         return 0;

     }

     root = sqrt(n);

     for(i = 3; i <= root; i = i + 2) {

         if(n % i == 0) {

             return 0;

         }

     }

     return 1;

 }



 int main()

 {

     int n, m,i;

         scanf("%d", &n);

         for( i=n;;i++)

         {

             if(is_prime(i))

                break;

         }



     cout<<i<<endl;

     return 0;

 }
// Slower C++ solution:
//

// Created by Mahmoud Rashad on 11/27/19.

//



#include <bits/stdc++.h>





using namespace std;



typedef vector<int> vi;

typedef pair<int, int> ii;

typedef vector<pair<ii, ii>> vii;



void sieve(vector<bool> &isPrime, int n) {

    isPrime.resize(n + 1, true);

    isPrime[0] = isPrime[1] = false;

    for (int i = 2; i * i <= n; ++i) {

        if (isPrime[i]) {

            for (int j = i * i; j <= n; j += i) {

                isPrime[j] = false;

            }

        }

    }

}



int main() {

#ifndef ONLINE_JUDGE

//    freopen("input.txt", "r", stdin);

//    freopen("output.out", "w", stdout);

#endif

    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0), cout.precision(10), cout << fixed;



    vector<bool> isPrime;

    sieve(isPrime, 200005);

    int x;

    cin >> x;

    while(true) {

        if (isPrime[x]) {

            cout << x << '\n';

            return 0;

        }

        ++x;

    }



}

// Faster C++ solution for the same problem (measured speedup: 1.6114468312823598x):
#include <bits/stdc++.h>

using namespace std;

bool p(int n)

{

    if (n == 3 || n==2)

        {return true;}

    if (n%2 == 0 || n%3 == 0)

        {return false;}



    for (int i=5; i*i<=n; i=i+6)

    {

        if (n%i == 0 || n%(i+2) == 0)

        {

            return false;

        }

    }

    return true;

}

int np(int n)

{

    int prime = n;

    bool x = false;

    while (!x)

    {

        prime++;



        if (p(prime))

            {x= true;}

    }



    return prime;

}





int main()

{

    int n;

    cin>>n;

    if(p(n))

    {

        cout<<n<<endl;

        return 0;

    }

    else

    cout << np(n);

    return 0;}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;

const int N=2e5+5,mod=1e9+7;

#define ll long long

bool vis[N];

int a[N];

int main()

{

    ios_base::sync_with_stdio(0);

    cin.tie(0);cout.tie(0);

    int n;

    cin>>n;

    for(ll i=2;i<N;i++)if(!vis[i])

    {

        if(i>=n) return cout<<i<<endl,0;

        for(ll j=i*i;j<N;j+=i)

            vis[j]=1;

    }



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.7306332295490756x):
#include <bits/stdc++.h>

using namespace std;

bool p(int n)

{

    if (n == 3 || n==2)

        {return true;}

    if (n%2 == 0 || n%3 == 0)

        {return false;}



    for (int i=5; i*i<=n; i=i+6)

    {

        if (n%i == 0 || n%(i+2) == 0)

        {

            return false;

        }

    }

    return true;

}

int np(int n)

{

    int prime = n;

    bool x = false;

    while (!x)

    {

        prime++;



        if (p(prime))

            {x= true;}

    }



    return prime;

}





int main()

{

    int n;

    cin>>n;

    if(p(n))

    {

        cout<<n<<endl;

        return 0;

    }

    else

    cout << np(n);

    return 0;}
// Slower C++ solution:
#include <bits/stdc++.h>

#define sz 200009

using namespace std;

typedef long long ll;

int vis[sz+7];

void sieve()

{

  ll i,j;

  vis[0]=vis[1]=1;

  for (i=4; i<=sz; i+=2) vis[i]=1;



  for(i=3; i<=sz; i+=2)

  {

     if (vis[i]==0)

     {

       for (j=i*i; j<=sz; j+=i) vis[j]=1;

     }

  }

}

int main()

{

  sieve();



  int i,n=0;

  cin>>n;

  for(i=n; ; i++)

  {

  	if(vis[i]==0) {

  		cout<<i<<endl;

  		break;

  	}

  }

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.1481687276772004x):
#include <bits/stdc++.h>

using namespace std;

bool p(int n)

{

    if (n == 3 || n==2)

        {return true;}

    if (n%2 == 0 || n%3 == 0)

        {return false;}



    for (int i=5; i*i<=n; i=i+6)

    {

        if (n%i == 0 || n%(i+2) == 0)

        {

            return false;

        }

    }

    return true;

}

int np(int n)

{

    int prime = n;

    bool x = false;

    while (!x)

    {

        prime++;



        if (p(prime))

            {x= true;}

    }



    return prime;

}





int main()

{

    int n;

    cin>>n;

    if(p(n))

    {

        cout<<n<<endl;

        return 0;

    }

    else

    cout << np(n);

    return 0;}