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;
void solve() {
  int n;
  scanf("%d", &n);
  int res = 0;
  res += ((n >> 5) & 1) << 5;
  res += ((n >> 0) & 1) << 4;
  res += ((n >> 2) & 1) << 3;
  res += ((n >> 3) & 1) << 2;
  res += ((n >> 1) & 1) << 1;
  res += ((n >> 4) & 1) << 0;
  printf("%d\n", res);
}
int main() {
  solve();
  return 0;
}