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;
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(6);
  long long index = 5;
  while (n) {
    a[index] = (n & 1);
    index--;
    n >>= 1;
  }
  swap(a[1], a[5]);
  swap(a[2], a[3]);
  long long ans = 0;
  long long val = 0;
  for (long long i = 5; i >= 0; i--) {
    if (a[i] == 1) {
      ans += (1 << val);
    }
    val++;
  }
  cout << ans;
}
signed main() {
  std ::ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long tt = 1;
  while (tt--) {
    solve();
  }
  return 0;
}