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() {
  int a;
  int ans = 0;
  cin >> a;
  vector<int> b(6);
  vector<int> c{4, 1, 3, 2, 0, 5};
  for (int i = 0; i < 6; i++) {
    b[i] = (a >> i) & 1;
    if (b[i]) ans += (1 << c[i]);
  }
  cout << ans;
}