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;
int32_t main() {
  long long n, i = 0;
  cin >> n;
  long long a[6];
  while (i < 6) {
    a[i] = (n >> i) & 1;
    i++;
  }
  swap(a[2], a[3]);
  swap(a[0], a[4]);
  long long x = 0;
  for (long long i = 6 - 1; i >= 0; i--) {
    if (a[i] == 1) x += pow(2, i);
  }
  cout << x << ' ';
}