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 n, ans, now, a[101];
int main() {
  cin >> n;
  while (n) {
    a[++now] = n % 2;
    n /= 2;
  }
  swap(a[1], a[5]);
  swap(a[3], a[4]);
  for (int i = 64; i > 0; i--) ans = ans * 2 + a[i];
  cout << ans;
  return 0;
}