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;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 10;
const int inf = 0x3f3f3f3f;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int a[10];
  for (int i = (1); i <= (6); i++) {
    a[i] = n & 1;
    n >>= 1;
  }
  swap(a[1], a[5]);
  swap(a[3], a[4]);
  int sum = 0;
  for (int i = (1); i <= (6); i++) {
    sum += (1 << (i - 1)) * a[i];
  }
  cout << sum << '\n';
  return 0;
}