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;
long long n = 0, m = 0, i, b = 0, c = 0, d = 0, e = 0, o1 = 0, o2,
          colour[100000] = {}, c2[100000], c3, o = 0, j, x;
string s, s1;
char t;
bool used[10000], f = 1;
vector<long long> ve[100000];
void dfs(long long u) {
  if (colour[u] == 1) {
    cout << "YES" << endl;
    for (i = 1; i <= o1; i++)
      if (c2[i] == u) x = i;
    for (i = x; i <= o1; i++) cout << c2[i] << " ";
    exit(0);
  };
  o1++;
  c2[o1] = u;
  colour[u] = 1;
  for (int i = 0; i < ve[u].size(); i++)
    if (colour[ve[u][i]] != 2) dfs(ve[u][i]);
  colour[u] = 2;
}
int main() {
  cin >> n;
  cout << n % 2;
  return 0;
}