#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int k;
  cin >> k;
  set<int> s1 = {1, 2, 3, 5, 7, 11, 13, 15, 17, 19, 23, 29, 31};
  set<int> s2 = {4, 6, 9, 10, 14, 21, 22, 25, 26};
  set<int> s4 = {28, 30};
  set<int> s5 = {8, 12, 18, 20, 27};
  if (k == 32)
    cout << 51 << "\n";
  else if (k == 16)
    cout << 14 << "\n";
  else if (s1.count(k))
    cout << 1 << "\n";
  else if (s2.count(k))
    cout << 2 << "\n";
  else if (s4.count(k))
    cout << 4 << "\n";
  else
    cout << 5 << "\n";
  return 0;
}
