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;
bitset<6> a, b;
int main() {
  int n;
  cin >> n;
  a = bitset<6>(n);
  b.set(5, a[5]);
  b.set(4, a[0]);
  b.set(3, a[2]);
  b.set(2, a[3]);
  b.set(1, a[1]);
  b.set(0, a[4]);
  cout << b.to_ulong();
}