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 main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  {
    long long n, i, x, d;
    cin >> n;
    long long bin[6];
    for (i = 0; i < 6; i++) {
      bin[i] = (n >> i) & 1;
    }
    swap(bin[0], bin[4]);
    swap(bin[2], bin[3]);
    d = 0;
    for (i = 0; i < 6; i++) {
      d |= (bin[i] << i);
    }
    cout << d;
  }
  cerr << " Execution : " << (1.0 * clock()) / CLOCKS_PER_SEC << "s \n";
  return 0;
}