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>
#pragma warning(disable : 4996)
#pragma optimize("gtsy", on)
using namespace std;
const long double EPS = 1e-8;
const int INF = (int)1e9 + 10;
const int MOD = (int)1e9 + 7;
const int N = (int)2e5 + 10;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  ;
  cout << (n & (1 << 5)) + ((n & (1 << 4)) >> 4) + ((n & (1 << 3)) >> 1) +
              ((n & (1 << 2)) << 1) + (n & (1 << 1)) + ((n & 1) << 4);
  return 0;
}