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>
const long long int mod = 1e9 + 7;
const long long int INF = 10000000000000;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long int ar[6] = {4, 1, 3, 2, 0, 5};
  long long int n = 0;
  cin >> n;
  long long int ans = 0;
  for (long long int i = 0; i < 6; ++i) {
    long long int a = n & (long long int)pow(2, i);
    if (a) ans += pow(2, ar[i]);
  }
  cout << ans;
}