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 long long MAXN = (long long)1e6 + 10;
long long a[MAXN];
long long n, m;
void solution() {
  long long n;
  cin >> n;
  long long a[] = {16, 2, 8, 4, 1, 32};
  long long ans = 0;
  for (long long i = 0; i < 7; i++) {
    if ((1 << i) & n) {
      ans += a[i];
    }
  }
  cout << ans << endl;
}
int32_t main() {
  ios::sync_with_stdio(0);
  long long t = 1;
  while (t--) solution();
}