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 s[70];
int n;
int ans;
int main() {
  scanf("%d", &n);
  while (n) {
    s[++s[0]] = n % 2;
    n /= 2;
  }
  swap(s[1], s[5]);
  swap(s[3], s[4]);
  for (int i = 64; i >= 1; i--) ans = ans * 2 + s[i];
  printf("%d", ans);
  return 0;
}