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 printbinary(const unsigned int val) {
  int a[4], j = 0;
  for (int i = 3; i >= 0; i--) {
    if (val & (1 << i)) {
      a[j] = 1;
      j++;
    } else {
      a[j] = 0;
      j++;
    }
  }
  return a[3] * 2 * 2 * 2 + a[2] * 2 * 2 + a[1] * 2 + a[0];
}
int main() {
  int n, a;
  cin >> n;
  a = printbinary(n);
  a = printbinary(a - 1);
  cout << a;
  return 0;
}