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