using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static void Main()
    {
        var 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";
        var a = s.Split(", ").Select(int.Parse).ToArray();
        var n = int.Parse(Console.ReadLine()) - 1;
        Console.WriteLine(a[n]);
    }
}
