#include <bits/stdc++.h>
using namespace std;
inline int Int() {
  int x;
  cin >> x;
  return x;
}
inline long long Long() {
  long long x;
  cin >> x;
  return x;
}
inline float Float() {
  float x;
  cin >> x;
  return x;
}
inline double Double() {
  double x;
  cin >> x;
  return x;
}
inline void Yes() { cout << "Yes" << endl; }
inline void No() { cout << "No" << endl; }
inline void YES() { cout << "YES" << endl; }
inline void NO() { cout << "NO" << endl; }
const int N = (int)2e5 + 5;
const int maxN = (int)1e6 + 6;
const long long Mod = (long long)1e9 + 7;
const int inf = (int)2e9;
const long long Inf = (long long)1e18;
int main() {
  int K;
  cin >> K;
  if (K == 1 || K == 2 || K == 3 || K == 5 || K == 7 || K == 11 || K == 13 ||
      K == 15 || K == 17 || K == 19 || K == 23 || K == 29 || K == 31)
    cout << 1 << endl;
  else if (K == 4 || K == 6 || K == 9 || K == 10 || K == 14 || K == 21 ||
           K == 22 || K == 25 || K == 26)
    cout << 2 << endl;
  else if (K == 12 || K == 8 || K == 18 || K == 20 || K == 27)
    cout << 5 << endl;
  else if (K == 30 || K == 18)
    cout << 4 << endl;
  else if (K == 16)
    cout << 14 << endl;
  else if (K == 24)
    cout << 15 << endl;
  else
    cout << 51 << endl;
  return 0;
}
