#include <bits/stdc++.h>
using namespace std;
int main() {
  int K;
  cin >> K;
  if (K = 1, 2, 3, 5, 7, 11, 13, 15, 17, 19, 23, 29, 31) {
    cout << 1 << endl;
  } else if (K = 4, 6, 9, 10, 14, 21, 22, 25, 26) {
    cout << 2 << endl;
  } else if (K = 28, 30) {
    cout << 4 << endl;
  } else if (K = 8, 12, 18, 20, 27) {
    cout << 5 << endl;
  } else if (K = 16) {
    cout << 14 << endl;
  } else if (K = 24) {
    cout << 15 << endl;
  } else {
    cout << 51 << endl;
  }
}
