Problem: 

Input

The input contains a single integer a (0 ≤ a ≤ 35).

Output

Output a single integer.

Examples

Input

3


Output

8


Input

10


Output

1024

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  switch (a) {
    case 0:
      puts("15");
      break;
    case 1:
      puts("14");
      break;
    case 2:
      puts("12");
      break;
    case 3:
      puts("13");
      break;
    case 4:
      puts("8");
      break;
    case 5:
      puts("9");
      break;
    case 6:
      puts("10");
      break;
    case 7:
      puts("11");
      break;
    case 8:
      puts("0");
      break;
    case 9:
      puts("1");
      break;
    case 10:
      puts("2");
      break;
    case 11:
      puts("3");
      break;
    case 12:
      puts("4");
      break;
    case 13:
      puts("5");
      break;
    case 14:
      puts("6");
      break;
    case 15:
      puts("7");
      break;
  }
}