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 main() {
  cin.tie(0);
  cin.exceptions(cin.failbit);
  long long int t, n, i, j, x, y, m, l, d, k;
  cin >> n;
  vector<long long int> v;
  for (int i = 0; i < 4; i++) {
    v.push_back(n % 2);
    n = n / 2;
  }
  reverse(v.begin(), v.end());
  v[0] = 1 - v[0];
  if (v[0]) v[1] = 1 - v[1];
  if (v[0] && v[1]) v[2] = 1 - v[2];
  if (v[0] && v[1] && v[2]) v[3] = 1 - v[3];
  long long int ans = 0;
  for (int i = 0; i < 4; i++) {
    ans *= 2;
    ans += v[i];
  }
  cout << ans;
}