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() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  int tn = n;
  vector<int> bin;
  while (tn > 0) {
    bin.push_back(tn % 2);
    tn /= 2;
  }
  int s = bin.size();
  for (int i = s; i < 6; i++) bin.push_back(0);
  int ans =
      bin[4] + 2 * bin[1] + 4 * bin[3] + 8 * bin[2] + 16 * bin[0] + 32 * bin[5];
  cout << ans << "\n";
}