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>
std::mt19937_64 mt;
int main(int argc, char* argv[]) {
  int n;
  std::cin >> n;
  int b6 = n % 2;
  n /= 2;
  int b5 = n % 2;
  n /= 2;
  int b4 = n % 2;
  n /= 2;
  int b3 = n % 2;
  n /= 2;
  int b2 = n % 2;
  n /= 2;
  int b1 = n % 2;
  n /= 2;
  printf("%d\n", b1 * 32 + b5 * 2 + b6 * 16 + b2 + b3 * 4 + b4 * 8);
}