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 mod1 = 1e17 + 3;
long long mod = 998244353;
const long long N = 1e3 + 10;
string s;
void solve() {
  long long n;
  cin >> n;
  string s = "000000";
  int i = 0;
  while (n) {
    if (n % 2) s[i] = '1';
    n /= 2;
    i++;
  }
  reverse(s.begin(), s.end());
  swap(s[1], s[5]);
  swap(s[2], s[3]);
  long long ans = 0;
  for (int i = 5; i >= 0; i--) ans += pow(2, 5 - i) * (s[i] - '0');
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}