#include <bits/stdc++.h>
using namespace std;
long long int Lpow(long long int a, long long int b) {
  long long int ans = 1;
  while (b > 0) {
    if (b % 2) ans = (ans * a);
    a = (a * a);
    b = b / 2;
  }
  return ans;
}
long long int gcd(long long int a, long long int b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b, a % b);
}
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  vector<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};
  int n;
  cin >> n;
  cout << arr[n] << '\n';
  return 0;
}
