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() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  int n, ans = 0, a[6];
  ;
  cin >> n;
  for (int i = 0; i < 6; i++) a[i] = (bool)(n & (1 << i));
  reverse(a, a + 6);
  swap(a[1], a[5]);
  swap(a[2], a[3]);
  reverse(a, a + 6);
  for (int i = 0; i < 6; i++) ans += (a[i]) ? (1 << i) : 0;
  cout << ans << endl;
  return 0;
}