#include <bits/stdc++.h>
using namespace std;
int main() {
  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";
  else if (n == 4 || n == 6 || n == 9 || n == 10 || n == 14 || n == 21 ||
           n == 22 || n == 26 || n == 25)
    cout << "2";
  else if (n == 28 || n == 30)
    cout << "4";
  else if (n == 8 || n == 18 || n == 20 || n == 12 || n == 8)
    cout << "5";
  else if (n == 16)
    cout << "14";
  else if (n == 24)
    cout << "15";
  else
    cout << "51";
  return 0;
}
