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;
int32_t main() {
  long long n;
  cin >> n;
  bitset<4> b1(n), b2;
  long long i;
  for (i = 0; i < 4; i++) {
    b2[4 - i - 1] = b1[i];
  }
  n = b2.to_ulong() - 1;
  bitset<4> b3(n);
  for (i = 0; i < 4; i++) {
    b2[4 - i - 1] = b3[i];
  }
  cout << b2.to_ulong();
  return 0;
}