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;
bool a[7];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < 6; i++) a[i] = (n >> (5 - i)) & 1;
  int x;
  swap(a[1], a[5]);
  swap(a[2], a[3]);
  int ans = 0;
  for (int i = 0; i < 6; i++) ans = ans * 2 + a[i];
  cout << ans;
  return 0;
}