#D3879. Numbers Joke

    ID: 3219 Type: Default 2000ms 64MiB

Numbers Joke

Numbers Joke

Input

The input contains a single integer a (1 ≤ a ≤ 30).

Output

Output a single integer.

Example

Input

3

Output

27

inputFormat

Input

The input contains a single integer a (1 ≤ a ≤ 30).

outputFormat

Output

Output a single integer.

Example

Input

3

Output

27

样例

3
27

</p>