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;
const int N = 3e5 + 10;
const long long int M = 1e9 + 7;
int i, a[10], ans;
void solve() {
  int n;
  cin >> n;
  while (n) a[++i] = n % 2, n /= 2;
  swap(a[1], a[5]);
  swap(a[3], a[4]);
  for (i = 9; i; i--) ans = ans * 2 + a[i];
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
  cout << "\n";
  return 0;
}