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;
bool sortbydesc(pair<int, int> a, pair<int, int> b) {
  if (a.first != b.first)
    return a.first > b.first;
  else
    return a.second > b.second;
}
int32_t main() {
  int n;
  cin >> n;
  int a[6];
  for (int i = 0; i < 6; i++) {
    a[i] = 0;
  }
  int i = 0;
  while (n != 0) {
    a[i] = n % 2;
    n /= 2;
    i++;
  }
  swap(a[4], a[0]);
  swap(a[2], a[3]);
  int ans = 0;
  for (int i = 0; i < 6; i++) {
    ans = ans + int(pow(2, i) + 0.5) * a[i];
  }
  cout << ans << endl;
  return 0;
}