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;
class TSolver {
 public:
  int a;
  explicit TSolver(std::istream& in) { in >> a; }
  void Solve() {}
  void PrintAnswer(std::ostream& out) const { out << (1 & a); }
};
int main() {
  std::ios_base::sync_with_stdio(false);
  {
    auto solver = std::make_shared<TSolver>(std::cin);
    solver->Solve();
    solver->PrintAnswer(std::cout);
  }
  do {
  } while (false);
  return 0;
}