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;
const long long int infinity = 9e18;
bool compare(int a, int b) { return a > b; }
bool compare1(pair<int, int> a, pair<int, int> b) { return a.first > b.first; }
bool compare2(pair<int, int> a, pair<int, int> b) {
  return a.second < b.second;
}
long long int Npower(long long int a, long long int b) {
  long long int product = 1;
  while (b) {
    if (b & 1) {
      product = product * a;
    }
    a = a * a;
    b = b >> 1;
  }
  return product;
}
long long int power(long long int a, long long int b, long long int md) {
  long long int product = 1;
  while (b) {
    if (b & 1) {
      product = ((product % md) * (a % md)) % md;
    }
    a = ((a % md) * (a % md)) % md;
    b = b >> 1;
  }
  return product % md;
}
bool isprime(long long int n) {
  if (n < 2) return 0;
  long long int i = 2;
  while (i * i <= n) {
    if (n % i == 0) return 0;
    i++;
  }
  return 1;
}
long long int GCD(long long int a, long long int b) {
  return b == 0 ? a : GCD(b, a % b);
}
long long int LCM(long long int a, long long int b) {
  return (a / GCD(a, b)) * b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  long long int arr[] = {
      1,          2,          4,          8,          16,          32,
      64,         128,        256,        512,        1024,        2048,
      4096,       8092,       16184,      32368,      64736,       129472,
      258944,     517888,     1035776,    2071552,    4143104,     8286208,
      16572416,   33144832,   66289664,   132579328,  265158656,   530317312,
      1060634624, 2121269248, 4242538496, 8485076992, 16970153984, 33940307968};
  cout << arr[n];
  return 0;
}