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;
const int maxn = 1e6 + 5;
int n, m, k, t;
int a[10], b[10], c;
int main() {
  scanf("%d", &n);
  b[0] = 4, b[1] = 1, b[2] = 3, b[3] = 2, b[4] = 0, b[5] = 5;
  for (int i = 1, j = 0; i < 64; i <<= 1, ++j)
    if (n & i) a[j] = 1;
  int ans = 0;
  for (int i = 0; i < 6; ++i)
    if (a[b[i]]) ans ^= (1 << i);
  printf("%d", ans);
  return 0;
}