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 n;
  cin >> n;
  int a = ((n & 0b100000) != 0) << 5;
  int b = ((n & 0b1) != -0) << 4;
  int c = ((n & 0b100) != 0) << 3;
  int d = ((n & 0b1000) != 0) << 2;
  int e = ((n & 0b10) != 0) << 1;
  int f = ((n & 0b10000) != 0) << 0;
  cout << (a | b | c | d | e | f) << endl;
}