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 n;
  cin >> n;
  int a[6] = {0};
  for (int i = 5; i >= 0; i--) {
    a[i] = n % 2;
    n = n / 2;
  }
  int temp = a[1];
  a[1] = a[5];
  a[5] = temp;
  int t = a[2];
  a[2] = a[3];
  a[3] = t;
  int r = 1 * a[5] + 2 * a[4] + 2 * 2 * a[3] + 2 * 2 * 2 * a[2] +
          2 * 2 * 2 * 2 * a[1] + 2 * 2 * 2 * 2 * 2 * a[0];
  cout << r;
}