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>
template <typename T, typename U>
inline void swap(T &a, U &b) {
  a = a ^ b;
  b = a ^ b;
  a = a ^ b;
}
inline void swap(int &a, int &b) {
  a = a ^ b;
  b = a ^ b;
  a = a ^ b;
}
inline void swap(long long &a, long long &b) {
  a = a ^ b;
  b = a ^ b;
  a = a ^ b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (b > a) a = b;
}
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (b < a) a = b;
}
inline int gcd(int a, int b) {
  if (a < b) swap(a, b);
  while (b > 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long nchose(int a, int b) {
  long long ans = 1;
  smax(a, b - a);
  int p = 2;
  for (int i = (b - a + 1); i <= (b); i++) {
    ans *= (long long)i;
    while (p <= a && ans % p == 0) ans /= p++;
  }
  return ans;
}
using namespace std;
static long long MOD = 1000000007;
int n, i;
string s =
    "Washington,Adams,Jefferson,Madison,Monroe,Adams,Jackson,Van "
    "Buren,Harrison,Tyler,Polk,Taylor,Fillmore,Pierce,Buchanan,Lincoln,Johnson,"
    "Grant,Hayes,Garfield,Arthur,Cleveland,Harrison,Cleveland,McKinley,"
    "Roosevelt,Taft,Wilson,Harding,Coolidge,Hoover,Roosevelt,Truman,Eisenhower,"
    "Kennedy,Johnson,Nixon,Ford,Carter,Reagan,Bush,Clinton";
int main() {
  cin >> n;
  n--;
  for (i = 0; n > 0; i++) {
    if (s[i] == ',') n--;
  }
  for (; i < s.length() && s[i] != ','; i++) {
    cout << s[i];
  }
}