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 N, ans;
int a[10];
int main() {
  scanf("%d", &N);
  if (N & 1) ans += 16;
  if (N & 2) ans += 2;
  if (N & 4) ans += 8;
  if (N & 8) ans += 4;
  if (N & 16) ans += 1;
  if (N & 32) ans += 32;
  printf("%d\n", ans);
  return 0;
}