#include "pch.h"
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <istream>

using namespace std;
int main()
{
    std::string input = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51";
    std::string separator = ", ";
    auto separator_length = separator.length();
    auto v = std::vector<std::string>();

    auto offset = 0u;
    auto pos = input.find(separator, offset);
    while (pos != std::string::npos) {
        v.push_back(input.substr(offset, pos - offset));
        offset = pos + separator_length;
        pos = input.find(separator, offset);
    }
    v.push_back(input.substr(offset));

    int k = 0;
    cin >> k;
    cout << v[k-1] << endl;
}