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, i, j, temp, x = 0;
  cin >> n;
  int v[6];
  for (i = 5; i >= 0; i--) {
    v[i] = n % 2;
    n = n / 2;
  }
  temp = v[5];
  v[5] = v[1];
  v[1] = temp;
  temp = v[3];
  v[3] = v[2];
  v[2] = temp;
  for (i = 5, j = 0; i >= 0; i--, j++) {
    x += v[i] * ((int)pow(2, j));
  }
  cout << x << endl;
  return 0;
}