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;
unsigned long long int n, m, ans;
string str;
unsigned long long int solve() {
  cin >> n;
  unsigned long long int ans = 0;
  ans |= ((n & (1 << 0)) >> 0) << 4;
  ans |= ((n & (1 << 1)) >> 1) << 1;
  ans |= ((n & (1 << 2)) >> 2) << 3;
  ans |= ((n & (1 << 3)) >> 3) << 2;
  ans |= ((n & (1 << 4)) >> 4) << 0;
  ans |= ((n & (1 << 5)) >> 5) << 5;
  cout << ans;
  return 0;
}
signed main() {
  ios::sync_with_stdio(0);
  unsigned long long int t = 1;
  while (t--) solve();
  return 0;
}