CF1145C Mystery Circuit
Description

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