Limits 1s, 512 MB

In this problem, you will have to print the nn-th prime number. The first few prime numbers are given below:

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, ...

2 is the 1st prime, 3 is the 2nd prime, 5 is the 3rd prime, ...

Input

The input will contain a single integer nn (1n<5000001 \le n < 500000).

Output

Print the nn-th prime number.

Samples

InputOutput
1
2
InputOutput
2
3

Submit

Login to submit.

Statistics

60% Solution Ratio
Wl.ReinoEarliest, Sep '19
annita_d99Fastest, 0.0s
annita_d99Lightest, 5.5 kB
bokaifShortest, 52B
Toph uses cookies. By continuing you agree to our Cookie Policy.