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;
vector<int> v;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  while (n) {
    v.push_back(n % 2);
    n /= 2;
  }
  while (v.size() < 6) v.push_back(0);
  vector<int> ans(6);
  ans[0] = v[4];
  ans[1] = v[1];
  ans[2] = v[3];
  ans[3] = v[2];
  ans[4] = v[0];
  ans[5] = v[5];
  reverse(ans.begin(), ans.end());
  int sol = 0;
  for (int i = 0; i < 6; i++) {
    sol *= 2;
    sol += ans[i];
  }
  cout << sol;
  return 0;
}