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;
vector<int> b;
void decToBinary(int n) {
  int i = 0;
  while (n > 0) {
    b[i] = n % 2;
    n = n / 2;
    i++;
  }
}
int binaryToDecimal(vector<int> &n) {
  int dec_value = 0;
  int base = 1;
  int t = 0;
  while (t < 6) {
    int last_digit = n[5 - t];
    dec_value += last_digit * base;
    base = base * 2;
    t++;
  }
  return dec_value;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  b.resize(6, 0);
  decToBinary(n);
  reverse(b.begin(), b.end());
  vector<int> d = {b[0], b[5], b[3], b[2], b[4], b[1]};
  cout << binaryToDecimal(d);
  return 0;
}