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;
string dToB(int n) {
  string s = bitset<64>(n).to_string();
  const auto loc1 = s.find('1');
  if (loc1 != string::npos) return s.substr(loc1);
  return "0";
}
int main() {
  int t;
  cin >> t;
  string s = dToB(t);
  while (s.length() != 6) s = '0' + s;
  string ans = "000000";
  ans[0] = s[0];
  ans[1] = s[5];
  ans[2] = s[3];
  ans[3] = s[2];
  ans[4] = s[4];
  ans[5] = s[1];
  cout << stoi(ans, 0, 2) << endl;
  return 0;
}