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 a, b = 0;
  cin >> a;
  if (a % 2 == 1) {
    b += 16;
  }
  if ((a >> 1) % 2 == 1) {
    b += 2;
  }
  if ((a >> 2) % 2 == 1) {
    b += 8;
  }
  if ((a >> 3) % 2 == 1) {
    b += 4;
  }
  if ((a >> 4) % 2 == 1) {
    b += 1;
  }
  if ((a >> 5) % 2 == 1) {
    b += 32;
  }
  cout << b << endl;
}