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 MAX = 1e6 + 6;
int main() {
  int n;
  cin >> n;
  string str = "";
  while (n) {
    str += ((n % 2) + '0');
    n /= 2;
  }
  reverse(str.begin(), str.end());
  while (str.size() < 6) str = "0" + str;
  string ss = "";
  ss += str[0];
  ss += str[5];
  ss += str[3];
  ss += str[2];
  ss += str[4];
  ss += str[1];
  int ret = 0;
  for (auto x : ss) ret = ret * 2 + (x - '0');
  cout << ret << '\n';
}