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>
#pragma GCC optimize("-O2")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int x, y = 0, z = 0;
  cin >> x;
  bitset<4> a(x);
  for (int i = 0; i < 4; ++i) y += a[3 - i] * (1 << i);
  bitset<4> b(y - 1);
  for (int i = 0; i < 4; ++i) z += b[3 - i] * (1 << i);
  cout << z << '\n';
  return 0;
}