2862: ABC149C - Next Prime
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:4
Solved:4
Description
Problem Statement
Find the minimum prime number greater than or equal to X.
Notes
A prime number is an integer greater than 1 that cannot be evenly divided by any positive integer except 1 and itself.For example, 2, 3, and 5 are prime numbers, while 4 and 6 are not.
Constraints
- 2≤X≤105
- All values in input are integers.
Input
Input
Input is given from Standard Input in the following format:
X
Output
Output
Print the minimum prime number greater than or equal to X.Sample Input Copy
20
Sample Output Copy
23