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;
  cin >> a;
  int b[6] = {0};
  int k = 5;
  while (a > 0) {
    b[k--] = a % 2;
    a = a / 2;
  }
  swap(b[1], b[5]);
  swap(b[2], b[3]);
  int sum = 0;
  for (int i = 0; i < 6; i++) sum += (b[i] * pow(2, 5 - i));
  cout << sum;
  return 0;
}