#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

## 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 *N*th superprime.

## Input

The input will contain one integer, *N*.

## Output

Your output should contain one integer, the *N*th 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

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 10 | 10 | 4s | 128MB | Minimum |

2 | 20 | 10 | 4s | 128MB | Minimum |

3 | 30 | 10 | 4s | 128MB | Minimum |

4 | 40 | 10 | 4s | 128MB | Minimum |

5 | 0 | 2 | 4s | 128MB | Minimum |

### Judge Compile Command

g++ ans.cpp -o superprimes -Wall -static -O2 -lm -m64 -s -w -std=gnu++14 -fmax-errors=512