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;
int a, arr[10];
int main() {
  cin >> a;
  for (int i = 1; i <= 5; i++) {
    arr[i] = 0;
  }
  for (int i = 5; i >= 0; i--) {
    if (a >= (1 << i)) {
      a -= (1 << i);
      arr[i] = 1;
    }
  }
  int ans = 0;
  swap(arr[0], arr[4]);
  swap(arr[2], arr[3]);
  for (int i = 0; i <= 5; i++) {
    ans += (arr[i] << i);
  }
  cout << ans << endl;
}