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