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 vis[15];
int main() {
  int num;
  scanf("%d", &num);
  int t = 0;
  while (num) {
    vis[t++] = num % 2;
    num = num / 2;
  }
  int ans = 0;
  if (vis[0]) ans += 16;
  if (vis[1]) ans += 2;
  if (vis[2]) ans += 8;
  if (vis[3]) ans += 4;
  if (vis[4]) ans += 1;
  if (vis[5]) ans += 32;
  printf("%d\n", ans);
}