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;
  cin >> a;
  vector<int> s(6);
  for (int i = 0; i < 6; i++) {
    if ((1 << i) & a) s[i]++;
  }
  int res = 0;
  res += (16 * s[0]);
  res += (2 * s[1]);
  res += (8 * s[2]);
  res += (4 * s[3]);
  res += s[4];
  res += (32 * s[5]);
  cout << res << endl;
  return 0;
}