Find the minimum prime number greater than or equal to X.

Constraints

* 2 \le X \le 10^5
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


X


Output

Print the minimum prime number greater than or equal to X.

Examples

Input

20


Output

23


Input

2


Output

2


Input

99992


Output

100003
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
bool hoge(int a){
    for(ll i=2;i*i <= a;i++){
        if(a%i == 0)return false;
    }
    return true;
}
int main(){
    int x;
    cin >> x;
    while(!hoge(x)){x++;}
    cout << x << endl;
}