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 read() {
  int num = 0;
  bool f = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    f = (ch == '-');
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    num = (num << 1) + (num << 3) + ch - '0';
    ch = getchar();
  }
  return f ? -num : num;
}
int main() {
  int num[111];
  int n = read(), cnt = 0, t = 0, ans = 0;
  memset(num, 0, sizeof(num));
  while (n) {
    num[cnt++] = n % 2;
    n >>= 1;
  }
  swap(num[0], num[4]);
  swap(num[2], num[3]);
  for (int i = 0; i <= 5; i++)
    if (num[i]) ans += pow(2, i);
  printf("%d\n", ans);
  return 0;
}