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