#P1145C. Mystery Circuit

Mystery Circuit

No submission language available for this problem.

Description

The input contains a single integer $a$ ($0 \le a \le 15$).

Output a single integer.

Input

The input contains a single integer $a$ ($0 \le a \le 15$).

Output

Output a single integer.

Samples

3
13