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 GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1, caseno = 0;
  while (t--) {
    long long n;
    cin >> n;
    long long bin[6];
    for (long long i = 0; i < 6; i++) bin[i] = 0;
    long long i = 5;
    while (n) {
      bin[i--] = n % 2;
      n /= 2;
    }
    swap(bin[1], bin[5]);
    swap(bin[2], bin[3]);
    long long ans = 0;
    for (long long j = 0; j < 6; j++) {
      ans += bin[j] * pow(2, 5 - j);
    }
    cout << ans << "\n";
  }
  return 0;
}