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;
int32_t main() {
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    bitset<6> b(n);
    long long a[6];
    a[0] = b[5];
    a[1] = b[0];
    a[2] = b[2];
    a[3] = b[3];
    a[4] = b[1];
    a[5] = b[4];
    long long pw[6] = {1, 2, 4, 8, 16, 32};
    long long ans = 0;
    for (long long i = 0; i < 6; i++) ans += (pw[6 - i - 1] * a[i]);
    cout << ans << endl;
  }
  return 0;
}