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 t, cnt = 0, sum = 0;
  scanf("%d", &t);
  vector<int> v(6, 0);
  while (t > 0) {
    v[5 - cnt] = t % 2;
    cnt++;
    t = t / 2;
  }
  swap(v[5], v[1]);
  swap(v[2], v[3]);
  for (int i = 0; i < 6; i++) {
    sum = sum + pow(2, 5 - i) * v[i];
  }
  cout << sum << endl;
  return 0;
}