## Primary indices

Statement

## Goal

The**Copeland–Erdős constant**is the concatenation of "0." with the base 10 representations of the prime numbers in order. Its value is approximately

**0.235711131719232931374143...**.

The goal is to output the digit (in the range of

`N`. Be careful, do not forget the decimal point.

**Important note:**In this exercice, the period representing the floating number is not omitted. Therefore, the first 2 is found at index

Input

**Line 1:**An integer

`N`representing the desired index.

Output

You must output the

`N`indice of the**Copeland–Erdős constant**. Be careful, do not forget the decimal point.**Line 1:**The digit found at the position`N`of the**Copeland–Erdős constant**.Constraints

0 ≤

`N`≤ 4722Example

Input

5

Output

7

Game modes

Fastest, Shortest

Test cases

Easy Test

Input

5

Output

7

Easy Validator

Input

7

Output

1

First 2-length number Test

Input

6

Output

1

First 2-length number Validator

Input

9

Output

3

Trying to trick Test

Input

0

Output

0

Trying to trick Validator

Input

1

Output

.

Big one Test

Input

100

Output

9

Big one Validator

Input

150

Output

2

Very big one Test

Input

2500

Output

3

Very big one Validator

Input

2000

Output

7

Hard one Test

Input

4721

Output

1

Hard one Validator

Input

4722

Output

0

Solution language

Solution

Stub generator input

Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!

JOIN US ON DISCORD Online Participants