using System;
using System.Numerics;
using System.Linq;
using System.Collections.Generic;
using System.Text;
namespace Atcoder20190616
{
class ProgramA
{
static void Main(string args)
{
//入力
int a = {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};
int k = int.Parse(Console.ReadLine());
//数列のk番目の要素を出す
Console.WriteLine(a[k -1]);
}
}
class ProgramB
{
static void Main(string args)
{
//入力
string input = Console.ReadLine().Split(' ');
long h = long.Parse(input[0]);
long w = long.Parse(input[1]);
//hかwが1のときは移動できない
if(h == 1 || w == 1)
{
Console.WriteLine("1");
return;
}
//両方奇数のときは足し合わせる
if(h % 2 == 1 && w % 2 == 1)
Console.WriteLine(h*w /2 + 1);
else
Console.WriteLine(h*w /2);
}
}
class ProgramC
{
static void Main(string args)
{
//入力
string input = Console.ReadLine().Split(' ');
long a = long.Parse(input[0]);
long b = long.Parse(input[1]);
long c = long.Parse(input[2]);
//二乗した差を考える。変形すると(c-a-b)^2 > 4abを満たすかどうかになる
long left = c - a - b;
long right = 4 * a* b;
//c-a-bが負だと満たさない
if(left <= 0)
{
Console.WriteLine("No");
return;
}
//あとは条件を満たすか確認
if(left * left > right)
Console.WriteLine("Yes");
else
Console.WriteLine("No");
}
}
class ProgramD
{
static void Main(string[] args)
{
//入力
int n = int.Parse(Console.ReadLine());
//深さ優先検索
dfs("", 'a', n);//1つ目は文字列を保存する、2つ目はfor文で繰り返すべき文字、3つ目は全文字数
}
static void dfs(string s, char mx, int n)
{
//n文字まで行ったら末端なのでそれは出力する
if(s.Length == n)
Console.WriteLine(s);
else
{
//もし最後の文字なら次の数ではその並びもあり得るので追加する
for(char c ='a'; c <=mx;c++)
dfs(s + c, (c == mx) ? (char)(mx + 1) : mx, n);
}
}
}
}