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 a[6] = {1, 2, 4, 8, 16, 32};
bool mark[6];
int main() {
  long long n, ans = 0;
  cin >> n;
  long long nn = n;
  for (int i = 5; i > -1; i--)
    if (nn >= a[i]) {
      mark[i] = 1;
      nn -= a[i];
    }
  if (mark[0]) ans += a[4];
  if (mark[1]) ans += a[1];
  if (mark[2]) ans += a[3];
  if (mark[3]) ans += a[2];
  if (mark[4]) ans += a[0];
  if (mark[5]) ans += a[5];
  cout << ans;
  return 0;
}