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(void) {
  int a;
  cin >> a;
  int bits[6] = {0};
  for (int i = 0; i < 6; i++) {
    bits[i] = (a >> (5 - i)) & 1;
  }
  int ob[6];
  ob[0] = bits[0];
  ob[1] = bits[5];
  ob[2] = bits[3];
  ob[3] = bits[2];
  ob[4] = bits[4];
  ob[5] = bits[1];
  int ans = 0;
  for (int i = 0; i < 6; i++) {
    ans |= (ob[i] << (5 - i));
  }
  cout << ans << endl;
  return 0;
}