Problem3885--ucyhf

3885: ucyhf

[Creator : ]
Time Limit : 2.000 sec  Memory Limit : 256 MiB

Description

time limit per test
2 seconds
memory limit per test
64 megabytes
input
standard input
output
standard output

qd ucyhf yi q fhycu dkcruh mxeiu huluhiu yi q tyvvuhudj fhycu dkcruh. oekh jqia yi je vydt jxu djx ucyhf.

Input

jxu ydfkj sediyiji ev q iydwbu ydjuwuh d (1≤d≤11184) − jxu edu-rqiut ydtun ev jxu ucyhf je vydt.

Output

ekjfkj q iydwbu dkcruh.

Examples
Input
1
Output
13

Source/Category