Mystery Circuit

题意翻译

![](https://cdn.luogu.org/upload/vjudge_pic/CF1145C/6683b6b619b14df545ab41fe76d7db5280148d99.png) 输入一个整数 $a$($0\le a\le 15$)。 输出一个整数。

题目描述

![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1145C/6683b6b619b14df545ab41fe76d7db5280148d99.png)

输入输出格式

输入格式


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

输出格式


Output a single integer.

输入输出样例

输入样例 #1

3

输出样例 #1

13