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 n;
  cin >> n;
  int b1, b2, b3, b4;
  b1 = n % 2;
  n /= 2;
  b2 = n % 2;
  n /= 2;
  b3 = n % 2;
  n /= 2;
  b4 = n % 2;
  b4 = !b4;
  if (b4) b3 = !b3;
  if (b4 && b3) b2 = !b2;
  if (b4 && b3 && b2) b1 = !b1;
  int m = 0;
  m += b4;
  m *= 2;
  m += b3;
  m *= 2;
  m += b2;
  m *= 2;
  m += b1;
  cout << m << endl;
  return 0;
}