Print the K-th element of the following sequence of length 32:                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
import string

alphabet = string.ascii_lowercase

n = int(input())

def DFS(before,keta):
    num = 0
    if keta == n:
        print(before)
        return
    for i in before:
        num = max(num,alphabet.index(i))
    num += 1
    for j in range(num+1):
        DFS(before+alphabet[j],keta+1)

DFS("a",1)
from sys import stdin,setrecursionlimit
from itertools import groupby
setrecursionlimit(10**7)
s = ['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']
k = int(stdin.readline().rstrip())
print(s[k-1])