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;
bool compare(const pair<long long, string>& i,
             const pair<long long, string>& j) {
  if (i.first != j.first)
    return i.first > j.first;
  else
    return i.second < j.second;
}
bool isPallindrome(string s) {
  for (long long i = 0; i <= s.length() / 2; i++) {
    if (s[i] != s[s.length() - i - 1]) return false;
  }
  return true;
}
bool isPrime(long long n) {
  if (n == 2 || n == 3) return true;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t, nnt = 0;
  long long vec[6] = {4, 1, 3, 2, 0, 5};
  cin >> t;
  for (long long i = 0; i < 6; i++) {
    if (t & (1 << i)) {
      nnt += (1 << vec[i]);
    }
  }
  cout << nnt;
}