#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  cin >> x;
  if (x == 6) {
    cout << 2 << endl;
  } else if (x == 4) {
    cout << 2 << endl;
  } else if (x == 9) {
    cout << 2 << endl;
  } else if (x == 10) {
    cout << 2 << endl;
  } else if (x == 14) {
    cout << 2 << endl;
  } else if (x == 21) {
    cout << 2 << endl;
  } else if (x == 22) {
    cout << 2 << endl;
  } else if (x == 25) {
    cout << 2 << endl;
  } else if (x == 26) {
    cout << 2 << endl;
  } else if (x == 8) {
    cout << 5 << endl;
  } else if (x == 12) {
    cout << 5 << endl;
  } else if (x == 18) {
    cout << 5 << endl;
  } else if (x == 20) {
    cout << 5 << endl;
  } else if (x == 27) {
    cout << 5 << endl;
  } else if (x == 16) {
    cout << 14 << endl;
  } else if (x == 24) {
    cout << 15 << endl;
  } else if (x == 29) {
    cout << 4 << endl;
  } else if (x == 30) {
    cout << 4 << endl;
  } else if (x == 32) {
    cout << 51 << endl;
  } else {
    cout << 1 << endl;
  }
}
