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 maxn = 1e5 + 10;
int cnt[10];
int main() {
  int n;
  cin >> n;
  for (int j = 0; j <= 5; ++j) {
    if ((n >> j) & 1)
      cnt[6 - j] = 1;
    else
      cnt[6 - j] = 0;
  }
  int tmp;
  tmp = cnt[2];
  cnt[2] = cnt[6];
  cnt[6] = tmp;
  tmp = cnt[4];
  cnt[4] = cnt[3];
  cnt[3] = tmp;
  int cn = 0;
  int ans = 0;
  for (int i = 6; i >= 1; i--) {
    ans = ans + pow(2, cn) * cnt[i];
    cn++;
  }
  cout << ans << endl;
  return 0;
}