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;
inline int read() {
  int sum = 0, ff = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') ff = -1;
    ch = getchar();
  }
  while (isdigit(ch)) sum = sum * 10 + (ch ^ 48), ch = getchar();
  return sum * ff;
}
char ch[11];
int p[11];
int main() {
  int n;
  n = read();
  p[0] = 2, p[1] = 5, p[2] = 3, p[3] = 4, p[4] = 6, p[5] = 1;
  int ans = 0;
  for (int i = 0; i <= 5; i++)
    if (n & (1 << i)) ans += (1 << (5 - (p[i] - 1)));
  cout << ans << endl;
  return 0;
}