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;
using ll = long long;
using ii = pair<int, int>;
using pll = pair<ll, ll>;
int main() {
  int n, k = 0;
  scanf("%d", &n);
  for (int i = 0; i < 4; i++)
    if (n & (1 << (3 - i))) k |= (1 << i);
  k--;
  n = 0;
  for (int i = 0; i < 4; i++)
    if (k & (1 << (3 - i))) n |= (1 << i);
  printf("%d\n", n);
}