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() {
  long long int a;
  cin >> a;
  long long int b[6], c[6];
  for (int i = 0; i < 6; ++i) {
    if (a % 2) {
      b[i] = 1;
    } else {
      b[i] = 0;
    }
    a = a / 2;
  }
  c[0] = b[5];
  c[1] = b[0];
  c[2] = b[2];
  c[3] = b[3];
  c[4] = b[1];
  c[5] = b[4];
  a = c[0] * 32 + c[1] * 16 + c[2] * 8 + c[3] * 4 + c[4] * 2 + c[5];
  cout << a;
}