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;
unsigned long long doublefactorial(unsigned long long n) {
  if (n == 0 || n == 1) return 1;
  return n * doublefactorial(n - 2);
}
int main() {
  int n;
  cin >> n;
  int sum = 0;
  bitset<6> b1(n);
  if (b1[5] == 1) {
    sum += 32;
  }
  if (b1[4] == 1) {
    sum += 1;
  }
  if (b1[3] == 1) {
    sum += 4;
  }
  if (b1[2] == 1) {
    sum += 8;
  }
  if (b1[1] == 1) {
    sum += 2;
  }
  if (b1[0] == 1) {
    sum += 16;
  }
  cout << sum << "\n";
}