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;
template <class T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int a;
  cin >> a;
  int m = 0;
  if (a & 1) m |= 16;
  if (a & 2) m |= 2;
  if (a & 4) m |= 8;
  if (a & 8) m |= 4;
  if (a & 16) m |= 1;
  if (a & 32) m |= 32;
  cout << m << endl;
  return 0;
}