Problem Description
As mentioned in a similar problem, Bradley loves primes! However, there is something he loves more. Superprimes!
What are superprimes? Basically, superprimes are primes in prime positions. In other words, let's take the first five primes [2, 3, 5, 7, 11] as an example. Superprimes are primes in position which are primes, so basically the superprimes are the 2nd, 3rd and 5th primes. (since 2 3 5 are primes), which are 3, 5 and 11. Thus, the first 3 superprimes are 3, 5 and 11.
Given an integer N, help Bradley find out the Nth superprime.
Input
The input will contain one integer, N.
Output
Your output should contain one integer, the Nth superprime.
Your output should be terminated by a newline.
Limits
Subtask 1 (10%): 1 ≤ N ≤ 100
Subtask 2 (20%): 1 ≤ N ≤ 1 000
Subtask 3 (30%): 1 ≤ N ≤ 10 000
Subtask 4 (40%): 1 ≤ N ≤ 100 000
Subtask 5 (0%): As per sample testcases
It is guranteed that the output will not exceed 30 000 000.
Sample Input 1
3
Sample Output 1
11
Sample Input 2
5
Sample Output 2
31