InputThe input contains a single integer a (1 ≤ a ≤ 40).OutputOutput a single string.ExamplesInput2OutputAdamsInput8OutputVan BurenInput29OutputHarding

The input contains a single integer a (1 ≤ a ≤ 40).

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string zt[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
    int n;
    cin>>n;
    cout<<zt[n-1];
}

#include<cstdio>

char s[100][40]={
    "Washington","Adams","Jefferson","Madison","Monroe",
    "Adams","Jackson","Van Buren","Harrison","Tyler",
    "Polk","Taylor","Fillmore","Pierce","Buchanan",
    "Lincoln","Johnson","Grant","Hayes","Garfield",
    "Arthur","Cleveland","Harrison","Cleveland","McKinley",
    "Roosevelt","Taft","Wilson","Harding","Coolidge",
    "Hoover","Roosevelt","Truman","Eisenhower","Kennedy",
    "Johnson","Nixon","Ford","Carter","Reagan"
};

int main(){
    int a;
    scanf("%d",&a);
    printf("%s",s[a-1]);
    return 0;
}

#include <iostream>
using namespace std;
int main()
{
    string a[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
    int n;
    cin>>n;
    cout<<a[n-1];
    return 0;
}

#include <stdio.h>

int main()
{
    int a;
    while (scanf("%d",&a)==1)
    {
        switch (a)
        {
            case 1:printf("Washington\n");break;
            case 2:printf("Adams\n");break;
            case 3:printf("Jefferson\n");break;
            case 4:printf("Madison\n");break;
            case 5:printf("Monroe\n");break;
            case 6:printf("Adams\n");break;
            case 7:printf("Jackson\n");break;
            case 8:printf("Van Buren\n");break;
            case 9:printf("Harrison\n");break;
            case 10:printf("Tyler\n");break;
            case 11:printf("Polk\n");break;
            case 12:printf("Taylor\n");break;
            case 13:printf("Fillmore\n");break;
            case 14:printf("Pierce\n");break;
            case 15:printf("Buchanan\n");break;
            case 16:printf("Lincoln\n");break;
            case 17:printf("Johnson\n");break;
            case 18:printf("Grant\n");break;
            case 19:printf("Hayes\n");break;
            case 20:printf("Garfield\n");break;
            case 21:printf("Arthur\n");break;
            case 22:printf("Cleveland\n");break;
            case 23:printf("Harrison\n");break;
            case 24:printf("Cleveland\n");break;
            case 25:printf("McKinley\n");break;
            case 26:printf("Roosevelt\n");break;
            case 27:printf("Taft\n");break;
            case 28:printf("Wilson\n");break;
            case 29:printf("Harding\n");break;
            case 30:printf("Coolidge\n");break;
            case 31:printf("Hoover\n");break;
            case 32:printf("Roosevelt\n");break;
            case 33:printf("Truman\n");break;
            case 34:printf("Eisenhower\n");break;
            case 35:printf("Kennedy\n");break;
            case 36:printf("Johnson\n");break;
            case 37:printf("Nixon\n");break;
            case 38:printf("Ford\n");break;
            case 39:printf("Carter\n");break;
            case 40:printf("Reagan\n");break;
            case 41:printf("Bush\n");break;
            case 42:printf("Clinton\n");break;
            case 43:printf("Bush\n");break;
            case 44:printf("Obama\n");break;
        }
    }
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
    string zt[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };//所有的总统名字
    int n;
    cin>>n;
    cout<<zt[n-1];
}

#include <bits/stdc++.h>
using namespace std;

int main(){
	string a[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
	int n;
	cin>>n;
	cout<<a[n-1]<<endl;
	return 0;
}

/*(^-^)*/
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<cmath>
#include<ctime>
#include<cstdio>
#include<vector>
#include<cctype>
#include<string>
#include<iomanip>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;

int n;
string a[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };

int main()
{
    cin>>n;
    cout<<a[n-1]<<endl;
    return 0;
}

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <vector>
#include <cstring>
#include <list>
#include <ctime>
#include <sstream>
#include <ctime>
#define eps 1e-8
#define mod 1000000007
#define INF 10000
#define pi 3.14159265358979323846264338327950288
using namespace std;

char str[100][100]={"Washington","Adams","Jefferson","Madison","Monroe",
"Adams","Jackson","Van Buren","Harrison","Tyler","Polk",
"Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson",
"Grant","Hayes","Garfield","Arthur","Cleveland",
"Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding",
"Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy",
"Johnson","Nixon","Ford","Carter","Reagan"};

int main()
{
    int n;
    scanf("%d",&n);
    printf("%s\n",str[n-1]);
    return 0;
}

#include<iostream>
using namespace std;
//Happy April Fool's Day!!!!!!
int main()
{
    string Pts[40] = {"Washington","Adams","Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
    int n;cin>>n;
    cout<<Pts[n-1];
    return 0;
}

/*

#include<cstdio>
#include<ctype.h>
#include<math.h>
#include<cstdlib>
#include<algorithm>
#include<cstring>

#include<sstream>
#include<vector>
#include<queue>
#include<stack>
*/#include<iostream>
#include<string>
/*
#define ll long long
#define ull unsigned long long
#define rg register
#define il inline
#define MAXN 1005
#define sstr stringstream
#define fp(i,l,r) for(register int i=(l);i<=(r);i++)
#define fd(i,r,l) for(register int i=(r);i>=(l);i--)
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
*/using namespace std;
string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
//khong biet 1st
int main()
{
    int n;
    cin>>n;
    cout<<arrPresidents[n-1];
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
string arrPresidents[40]={ "Washington", "Adams", "Jefferson", "Madison",
"Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk",
"Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant",
 "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland",
 "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover",
  "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford",
   "Carter", "Reagan" };
int main()
{
	int n;
	cin>>n;
	cout<<arrPresidents[n-1];
	return 0;
}

#include <iostream>
using namespace std;
int main()
{
    string p[100] = {"","Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
	int n;
	cin>>n;
	cout<<p[n];
}

#include<iostream>
#include<cstring>

using namespace std;

int main()
{
    string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
    int n;
    cin>>n;
    cout<<arrPresidents[n-1];
    return 0;
}

#include<stdio.h>
#include<string.h>
int main()
{
	int a;
	scanf("%d",&a);
	if(a==1)
		printf("Washington\n");
	if(a==2)
		printf("Adams\n");
	if(a==3)
		printf("Jefferson\n");
	if(a==4)
		printf("Madison\n");
	if(a==5)
		printf("Monroe\n");
	if(a==6)
		printf("Adams\n");
	if(a==7)
		printf("Jackson\n");
	if(a==8)
		printf("Van Buren\n");
	if(a==9)
		printf("Harrison\n");
	if(a==10)
		printf("Tyler\n");
	if(a==11)
		printf("Polk\n");
	if(a==12)
		printf("Taylor\n");
	if(a==13)
		printf("Fillmore\n");
	if(a==14)
		printf("Pierce\n");
	if(a==15)
		printf("Buchanan\n");
	if(a==16)
		printf("Lincoln\n");
	if(a==17)
		printf("Johnson\n");
	if(a==18)
		printf("Grant\n");
	if(a==19)
		printf("Hayes\n");
	if(a==20)
		printf("Garfield\n");
	if(a==21)
		printf("Arthur\n");
	if(a==22)
		printf("Cleveland\n");
	if(a==23)
		printf("Harrison\n");
	if(a==24)
		printf("Cleveland\n");
	if(a==25)
		printf("McKinley\n");
	if(a==26)
		printf("Roosevelt\n");
	if(a==27)
		printf("Taft\n");
	if(a==28)
		printf("Wilson\n");
	if(a==29)
		printf("Harding\n");
	if(a==30)
		printf("Coolidge\n");
	if(a==31)
		printf("Hoover\n");
	if(a==32)
		printf("Roosevelt\n");
	if(a==33)
		printf("Truman\n");
	if(a==34)
		printf("Eisenhower\n");
	if(a==35)
		printf("Kennedy\n");
	if(a==36)
		printf("Johnson\n");
	if(a==37)
		printf("Nixon\n");
	if(a==38)
		printf("Ford\n");
	if(a==39)
		printf("Carter\n");
	if(a==40)
		printf("Reagan\n");
	return 0;
}

#include<iostream>
#include<cstring>
using namespace std;
int main(){
	string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
	int n;
	cin>>n;
	cout<<arrPresidents[n-1]<<" \n";
	return 0;

}

#include <bits/stdc++.h>
using namespace std;
string a[]={"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler",
"Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur",
"Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt",
"Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan","Bush","Clinton","Bush","Obama"};
int main(){
	int x;
	cin>>x;
	cout<<a[x-1]<<endl;
}

#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main(){
	int n;
	scanf("%d", &n);
	cout<<arrPresidents[n-1]<<endl;
	return 0;
}

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <ctime>

using namespace std;

void Solve();

int main()
{
	Solve();
}
char a[][20]={" Washington "," Adams "," Jefferson "," Madison "," Monroe "," Adams "," Jackson "," Van Buren "," Harrison "," Tyler "," Polk "," Taylor "," Fillmore "," Pierce "," Buchanan "," Lincoln "," Johnson "," Grant "," Hayes "," Garfield "," Arthur "," Cleveland "," Harrison "," Cleveland "," McKinley "," Roosevelt "," Taft "," Wilson "," Harding "," Coolidge "," Hoover "," Roosevelt "," Truman "," Eisenhower "," Kennedy "," Johnson "," Nixon "," Ford "," Carter "," Reagan "," Bush "," Clinton", "Bush", "Obama" };
void Solve()
{
	int b; cin >> b;
	puts(a[b-1]+1);
}

#include<iostream>
using namespace std;
int main()
{
    string a[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
    int n;
    cin>>n;
    cout<<a[n-1];
    return 0;
}

#include<bits/stdc++.h>
#include<iomanip>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<math.h>
#include<vector>
#include<stack>
#include<time.h>
#include<queue>
#include<set>
#include<map>
#include<cstdlib>
#include<cstring>
#include<stdio.h>
#include<cmath>
#include<string>
#include<fstream>
#include<string.h>
using namespace std;
string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
{
	int a;
    cin>>a;
    cout<<arrPresidents[a-1];
    return 0;
}

#include<iostream>
using namespace std;
string s[40]={"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
int main()
{
	int i;
	cin>>i;
	cout<<s[i-1]<<endl;
}

#include<cstring>
#include<iostream>
using namespace std;
string zt[46] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
//这是一道愚人节题目特别水，题目中有直接复制粘贴就好
int main()
{
	int n;
	cin>>n;
	cout<<zt[n-1]<<endl;//n-1因为是从零开始的单这里确实从一开始的所以减一
	return 0;
}

#include<iostream>
#include<cstdio>
using namespace std;
string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main(){
	int n;
	cin>>n;
	cout<<arrPresidents[n-1];
	return 0;
}

#include<iostream>
#include<string>
using namespace std;
string s[41] = { " ","Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
{
	int n;
	cin>>n;
	cout<<s[n]<<endl;
	return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;
int main()
{
    int a;
    while(cin>>a)
    {
    if(a==1) printf("Washington");
    else if(a==2) printf("Adams");
    else if(a==3) printf("Jefferson");
    else if(a==4) printf("Madison");
    else if(a==5) printf("Monroe");
    else if(a==6) printf("Adams");
    else if(a==7) printf("Jackson");
    else if(a==9) printf("Harrison");
    else if(a==10) printf("Tyler");
    else if(a==11) printf("Polk");
    else if(a==12) printf("Taylor");
    else if(a==13) printf("Fillmore");
    else if(a==14) printf("Pierce");
    else if(a==15) printf("Buchanan");
    else if(a==16) printf("Lincoln");
    else if(a==17) printf("Johnson");
    else if(a==18) printf("Grant");
    else if(a==19) printf("Hayes");
    else if(a==20) printf("Garfield");
    else if(a==21) printf("Arthur");
    else if(a==22) printf("Cleveland");
    else if(a==23) printf("Harrison");
    else if(a==24) printf("Cleveland");
    else if(a==25) printf("McKinley");
    else if(a==26) printf("Roosevelt");
    else if(a==27) printf("Taft");
    else if(a==28) printf("Wilson");
    else if(a==30) printf("Coolidge");
    else if (a==8) printf("Van Buren");
    else if (a==29) printf("Harding");
    else if(a==31) printf("Hoover");
    else if(a==32) printf("Roosevelt");
    else if(a==33) printf("Truman");
    else if(a==34) printf("Eisenhower");
    else if(a==35) printf("Kennedy");
    else if(a==36) printf("Johnson");
    else if(a==37) printf("Nixon");
    else if(a==38) printf("Ford");
    else if(a==39) printf("Carter");
    else if(a==40) printf("Reagan");
    else if(a==41) printf("Bush");
    else if(a==42) printf("Clinton");
    else if(a==43) printf("Bush");
    else if(a==44) printf("Obama");
    }
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(){
	string a[]={"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan","Bush","Clinton","Bush","Obama"};
	int n;
	cin>>n;

	cout<<a[n-1];
	return 0;
}

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;

#define ll __int64
#define ls rt<<1
#define rs ls|1
#define lson l,mid,ls
#define rson mid+1,r,rs
#define middle (l+r)>>1
#define clr_all(x,c) memset(x,c,sizeof(x))
#define clr(x,c,n) memset(x,c,sizeof(x[0])*(n+1))
#define eps (1e-8)
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define PI (acos(-1.0))
#pragma comment(linker, "/STACK:102400000,102400000")
template <class T> T _max(T x,T y){return x>y? x:y;}
template <class T> T _min(T x,T y){return x<y? x:y;}
template <class T> T _abs(T x){return (x < 0)? -x:x;}
template <class T> T _mod(T x,T y){return (x > 0)? x%y:((x%y)+y)%y;}
template <class T> void _swap(T &x,T &y){T t=x;x=y;y=t;}
template <class T> void getmax(T& x,T y){x=(y > x)? y:x;}
template <class T> void getmin(T& x,T y){x=(x<0 || y<x)? y:x;}
int TS,cas=1;
const int M=60000+5;
int n;
char str[44][44]={"Washington",
"Adams",
"Jefferson",
"Madison",
"Monroe",
"Adams",
"Jackson",
"Van Buren",
"Harrison",
"Tyler",
"Polk",
"Taylor",
"Fillmore",
"Pierce",
"Buchanan",
"Lincoln",
"Johnson",
"Grant",
"Hayes",
"Garfield",
"Arthur",
"Cleveland",
"Harrison",
"Cleveland",
"McKinley",
"Roosevelt",
"Taft",
"Wilson",
"Harding",
"Coolidge",
"Hoover",
"Roosevelt",
"Truman",
"Eisenhower",
"Kennedy",
"Johnson",
"Nixon",
"Ford",
"Carter",
"Reagan"
};

void run(){
    int i,j;
    puts(str[n-1]);
}

void preSof(){
}

int main(){
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    preSof();
    //run();
    while(~scanf("%d",&n)) run();
    //for(scanf("%d",&TS);cas<=TS;cas++) run();
    return 0;
}

#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
string a[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main(){
	int n;
	cin>>n;
	cout<<a[n-1];
	return 0;
}

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <cmath>
#define forn(i,n) for(int i=0;i<n;i++)

using namespace std;

int main()
{
	int a;
	cin >> a;
	string prez[40] = {"Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk",
						"Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland",
						"Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt",
						"Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan"} ;
	cout << prez[a-1] << endl;
	return 0;
}

#include <iostream>
using namespace std;
string pres[] = { "Washington" , "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler" , "Polk" , "Taylor" , "Fillmore", "Pierce" , "Buchanan" ,"Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan","Bush","Clinton" };
int main()
{
    int n;
    cin >> n;
    cout << pres[n-1];
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string ap[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
	int n;
	cin>>n;
	cout<<ap[n-1];
	return 0;
}

#include <iostream>

using namespace std;

string s[40] = {"Washington", "Adams", "Jefferson",
				"Madison", "Monroe", "Adams",
				"Jackson", "Van Buren", "Harrison",
				"Tyler", "Polk", "Taylor", "Fillmore",
				"Pierce", "Buchanan", "Lincoln",
				"Johnson", "Grant", "Hayes",
				"Garfield", "Arthur", "Cleveland",
				"Harrison", "Cleveland",
				"McKinley", "Roosevelt", "Taft",
				"Wilson", "Harding", "Coolidge",
				"Hoover", "Roosevelt", "Truman",
				"Eisenhower", "Kennedy", "Johnson",
				"Nixon", "Ford", "Carter", "Reagan"};

int main () {
    int n;
    cin >> n;
    cout << s[n - 1];

    return 0;
}

#include<iostream>
#include<cstring>
using namespace std;
string arrPresidents[40] = {"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
int main()
{
    int n;
    cin>>n;
    cout<<arrPresidents[n-1]<<endl;
    return 0;
}

#include<iostream>
using namespace std;
int n;
string s[40]={"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
int main()
{
	cin>>n;
	cout<<s[n-1]<<endl;
}

#include<iostream>
#include<cstring>
using namespace std;
int main()
{
    string pre[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" }; //����������ͳ������
    int n;
    cin >> n;
    cout << pre[n - 1] <<endl;
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    int a;
    cin>>a;
    switch(a)
    {
        case 1: cout<<"Washington"; break;
        case 2: cout<<"Adams"; break;
        case 3: cout<<"Jefferson"; break;
        case 4: cout<<"Madison"; break;
        case 5: cout<<"Monroe"; break;
        case 6: cout<<"Adams"; break;
        case 7: cout<<"Jackson"; break;
        case 8: cout<<"Van Buren"; break;
        case 9: cout<<"Harrison"; break;
        case 10: cout<<"Tyler"; break;
        case 11: cout<<"Polk"; break;
        case 12: cout<<"Taylor"; break;
        case 13: cout<<"Fillmore"; break;
        case 14: cout<<"Pierce"; break;
        case 15: cout<<"Buchanan"; break;
        case 16: cout<<"Lincoln"; break;
        case 17: cout<<"Johnson"; break;
        case 18: cout<<"Grant"; break;
        case 19: cout<<"Hayes"; break;
        case 20: cout<<"Garfield"; break;
        case 21: cout<<"Arthur"; break;
        case 22: cout<<"Cleveland"; break;
        case 23: cout<<"Harrison"; break;
        case 24: cout<<"Cleveland"; break;
        case 25: cout<<"McKinley"; break;
        case 26: cout<<"Roosevelt"; break;
        case 27: cout<<"Taft"; break;
        case 28: cout<<"Wilson"; break;
        case 29: cout<<"Harding"; break;
        case 30: cout<<"Coolidge"; break;
        case 31: cout<<"Hoover"; break;
        case 32: cout<<"Roosevelt"; break;
        case 33: cout<<"Truman"; break;
        case 34: cout<<"Eisenhower"; break;
        case 35: cout<<"Kennedy"; break;
        case 36: cout<<"Johnson"; break;
        case 37: cout<<"Nixon"; break;
        case 38: cout<<"Ford"; break;
        case 39: cout<<"Carter"; break;
        case 40: cout<<"Reagan"; break;
    }
    return 0;
}

#include <iostream>
#include <string>

using namespace std;

int main() {
    string ans[50];

    ans[1] = "Washington";
ans[2] = "Adams";
ans[3] = "Jefferson";
ans[4] = "Madison";
ans[5] = "Monroe";
ans[6] = "Adams";
ans[7] = "Jackson";
ans[8] = "Van Buren";
ans[9] = "Harrison";
ans[10] = "Tyler";
ans[11] = "Polk";
ans[12] = "Taylor";
ans[13] = "Fillmore";
ans[14] = "Pierce";
ans[15] = "Buchanan";
ans[16] = "Lincoln";
ans[17] = "Johnson";
ans[18] = "Grant";
ans[19] = "Hayes";
ans[20] = "Garfield";
ans[21] = "Arthur";
ans[22] = "Cleveland";
ans[23] = "Harrison";
ans[24] = "Cleveland";
ans[25] = "McKinley";
ans[26] = "Roosevelt";
ans[27] = "Taft";
ans[28] = "Wilson";
ans[29] = "Harding";
ans[30] = "Coolidge";
ans[31] = "Hoover";
ans[32] = "Roosevelt";
ans[33] = "Truman";
ans[34] = "Eisenhower";
ans[35] = "Kennedy";
ans[36] = "Johnson";
ans[37] = "Nixon";
ans[38] = "Ford";
ans[39] = "Carter";
ans[40] = "Reagan";

int n;

cin >> n;

cout << ans[n];
    return 0;
}

#include <iostream>
#include <string>

using namespace std;

string res[] = {"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler",
"Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur",
"Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt",
"Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan","Bush","Clinton","Bush","Obama"};

int main() {
    int n;
    cin >> n;
    cout << res[n - 1] << endl;
}

#include<bits/stdc++.h>
using namespace std;
string db[102] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };//打表（复制粘贴真好玩）
int main()
{
    int n;
    cin>>n;
    cout<<db[n-1];
    return 0;
}

#include <iostream>
#include <string>
using namespace std;
string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
{
    int n;
    cin>>n;
    cout<<arrPresidents[n-1];
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	string pre[41] = {" ","Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan" };
	cin>>n;
	cout<<pre[n]<<endl;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main()
{
    string arrPresidents[41] = {" ","Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
	int x;
	cin >> x;
	cout << arrPresidents[x];
    return 0;
}

#include <iostream>
#include <string>
using namespace std;
int main(){
    int a; cin >> a;
    string ans[40] = {"Washington", "Adams", "Jefferson", "Madison", "Monroe",
    "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk",
    "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant",
    "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland",
    "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge",
    "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson",
    "Nixon", "Ford", "Carter", "Reagan"};
    cout << ans[a - 1] << endl;
}

#include <iostream>

using namespace std;

char *presidents[] = {
    "Washington",
    "Adams",
    "Jefferson",
    "Madison",
    "Monroe",
    "Adams",
    "Jackson",
    "Van Buren",
    "Harrison",
    "Tyler",
    "Polk",
    "Taylor",
    "Fillmore",
    "Pierce",
    "Buchanan",
    "Lincoln",
    "Johnson",
    "Grant",
    "Hayes",
    "Garfield",
    "Arthur",
    "Cleveland",
    "Harrison",
    "Cleveland",
    "McKinley",
    "Roosevelt",
    "Taft",
    "Wilson",
    "Harding",
    "Coolidge",
    "Hoover",
    "Roosevelt",
    "Truman",
    "Eisenhower",
    "Kennedy",
    "Johnson",
    "Nixon",
    "Ford",
    "Carter",
    "Reagan"
};

int main()
{
    int n;
    cin >> n;
    cout << presidents[n-1];
    return 0;
}

#include <bits/stdc++.h>

using namespace std;
#define F first
#define S second
#define sz size()
#define m_p make_pair
#define pb push_back
#define ll long long
#define ldo long double
#define n_p next_permutation
#define stri sort((a).begin(),(a),end())
#define ios ios_base::sync_with_stdio(0)

const ll AV = 1e16;
const ll AB = 1e9 + 7;
const ll AC = 1e6 + 1;
const ll AN = 1e5 + 1;
const ll AP = 1e4 + 1;

ll n;
int main()
{

    cin >> n;

    if(n == 1)
    {
        cout << "Washington";
    }
    if(n == 2)
    {
        cout << "Adams";
    }
    if(n == 3)
    {
        cout << "Jefferson";
    }
    if(n == 4)
    {
        cout << "Madison";
    }
    if(n == 5)
    {
        cout << "Monroe";
    }
    if(n == 6)
    {
        cout << "Adams";
    }
    if(n == 7)
    {
        cout << "Jackson";
    }
    if(n == 8)
    {
        cout << "Van Buren";
    }
    if(n == 9)
    {
        cout << "Harrison";
    }
    if(n == 10)
    {
        cout << "Tyler";
    }
    if(n == 11)
    {
        cout << "Polk";
    }
    if(n == 12)
    {
        cout << "Taylor";
    }
    if(n == 13)
    {
        cout << "Fillmore";
    }
    if(n == 14)
    {
        cout << "Pierce";
    }
    if(n == 15)
    {
        cout << "Buchanan";
    }
    if(n == 16)
    {
        cout << "Lincoln";
    }
    if(n == 17)
    {
        cout << "Johnson";
    }
    if(n == 18)
    {
        cout << "Grant";
    }
    if(n == 19)
    {
        cout << "Hayes";
    }
    if(n == 20)
    {
        cout << "Garfield";
    }
    if(n == 21)
    {
        cout << "Arthur";
    }
    if(n == 22)
    {
        cout << "Cleveland";
    }
    if(n == 23)
    {
        cout << "Harrison";
    }
    if(n == 24)
    {
        cout << "Cleveland";
    }
    if(n == 25)
    {
        cout << "McKinley";
    }
    if(n == 26)
    {
        cout << "Roosevelt";
    }
    if(n == 27)
    {
        cout << "Taft";
    }
    if(n == 28)
    {
        cout << "Wilson";
    }
    if(n == 29)
    {
        cout << "Harding";
    }
    if(n == 30)
    {
        cout << "Coolidge";
    }
    if(n == 31)
    {
        cout << "Hoover";
    }
    if(n == 32)
    {
        cout << "Roosevelt";
    }
    if(n == 33)
    {
        cout << "Truman";
    }
    if(n == 34)
    {
        cout << "Eisenhower";
    }
    if(n == 35)
    {
        cout << "Kennedy";
    }
    if(n == 36)
    {
        cout << "Johnson";
    }
    if(n == 37)
    {
        cout << "Nixon";
    }
    if(n == 38)
    {
        cout << "Ford";
    }
    if(n == 39)
    {
        cout << "Carter";
    }
    if(n == 40)
    {
        cout << "Reagan";
    }
    if(n == 41)
    {
        cout << "Bush";
    }
    if(n == 42)
    {
        cout << "Clinton";
    }
    if(n == 43)
    {
        cout << "Bush";
    }
    if(n == 44)
    {
        cout << "Obama";
    }

    return 0;
}

#include<iostream>
#include<fstream>
#include<string>
using namespace std;

int main(){
	int N;
	string answ[50];
	answ[1]="Washington";
	answ[2]="Adams";
	answ[3]="Jefferson";
	answ[4]="Madison";
	answ[5]="Monroe";
	answ[6]="Adams";
	answ[7]="Jackson";
	answ[8]="Van Buren";
	answ[9]="Harrison";
	answ[10]="Tyler";
	answ[11]="Polk";
	answ[12]="Taylor";
	answ[13]="Fillmore";
	answ[14]="Pierce";
	answ[15]="Buchanan";
	answ[16]="Lincoln";
	answ[17]="Johnson";
	answ[18]="Grant";
	answ[19]="Hayes";
	answ[20]="Garfield";
	answ[21]="Arthur";
	answ[22]="Cleveland";
	answ[23]="Harrison";
	answ[24]="Cleveland";
	answ[25]="McKinley";
	answ[26]="Roosevelt";
	answ[27]="Taft";
	answ[28]="Wilson";
	answ[29]="Harding";
	answ[30]="Coolidge";
	answ[31]="Hoover";
	answ[32]="Roosevelt";
	answ[33]="Truman";
	answ[34]="Eisenhower";
	answ[35]="Kennedy";
	answ[36]="Johnson";
	answ[37]="Nixon";
	answ[38]="Ford";
	answ[39]="Carter";
	answ[40]="Reagan";
	answ[41]="Bush";
	answ[42]="Clinton";

	cin>>N;
	cout<<answ[N];

return 0;
}

/* Author haleyk10198 */
/* �@��:  haleyk10198 */
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <ctime>
#include <string>
#include <set>
#include <stack>

#define MOD 1000000007
#define INF 2147483647
#define PI 3.1415926535897932384626433
#define ll long long
#define pii pair<int,int>
#define mp(x,y) make_pair((x),(y))

//One words or two words for last names? @#$%^&*() Foreigner names format....

using namespace std;
string a[40]={"Washington","Adams","Jefferson","Madison","Monroe","Adams",
			"Jackson","Van Buren","Harrison","Tyler","Polk","Taylor",
			"Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes",
			"Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley",
			"Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover",
			"Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon",
			"Ford","Carter","Reagan"};

//Day 42: Done copying from Wikipedia ResidentSleeper
//TRIGGERED !VAN BUREN IS A TARP!

int main(){
	//ios_base::sync_with_stdio(false);
	int n;
	cin>>n;
	cout<<a[--n]<<endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std ;
int d,e,f;
int main()
{
    int n;
cin >> n;
string s[40]={"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
cout<<s[n-1];
}

#include<iostream>
using namespace std;
int main(){
    string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
    int n;
    cin>>n;
    cout<<arrPresidents[n-1];
return 0;
}

#include<iostream>
#include<cstring>
using namespace std;
string arrPresidents[40] = {"Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
{
	int a;cin>>a;cout<<arrPresidents[a-1];
	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	string zt[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
	int n;
	cin>>n;
	cout<<zt[n-1];
}

#include<bits/stdc++.h>
using namespace std;
int n;
string a[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
{
    cin>>n;
    cout<<a[n-1];
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string zt[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
    int n;
    cin>>n;
    cout<<zt[n-1];
    return 0;
}

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
using namespace std;
#define max(a,b) a>b?a:b
#define min(a,b) a<b?a:b
int main()
{
    int i;
    while(scanf("%d",&i)!=EOF)
    {
        if(i==1)
        {
            printf("Washington\n");
        }
        else if(i==2)
        {
            printf("Adams\n");
        }
        else if(i==3)
        {
            printf("Jefferson\n");
        }
        else if(i==4)
        {
            printf("Madison\n");
        }
        else if(i==5)
        {
            printf("Monroe\n");
        }
        else if(i==6)
        {
            printf("Adams\n");
        }else if(i==7)
        {
            printf("Jackson\n");
        }
        else if(i==8)
        {
            printf("Van Buren\n");
        }
        else if(i==9)
        {
            printf("Harrison\n");
        }
        else if(i==10)
        {
            printf("Tyler\n");
        }else if(i==11)
        {
            printf("Polk\n");
        }
        else if(i==12)
        {
            printf("Taylor\n");
        }
        else if(i==13)
        {
            printf("Fillmore\n");
        }
        else if(i==14)
        {
            printf("Pierce\n");
        }
        else if(i==15)
        {
            printf("Buchanan\n");
        }
        else if(i==16)
        {
            printf("Lincoln\n");
        }
        else if(i==17)
        {
            printf("Johnson\n");
        }
        else if(i==18)
        {
            printf("Grant\n");
        }
        else if(i==19)
        {
            printf("Hayes\n");
        }
        else if(i==20)
        {
            printf("Garfield\n");
        }
        else if(i==21)
        {
            printf("Arthur\n");
        }
        else if(i==22)
        {
            printf("Cleveland\n");
        }
        else if(i==23)
        {
            printf("Harrison\n");
        }
        else if(i==24)
        {
            printf("Cleveland\n");
        }
        else if(i==25)
        {
            printf("McKinley\n");
        }
        else if(i==26)
        {
            printf("Roosevelt\n");
        }
        else if(i==27)
        {
            printf("Taft\n");
        }
        else if(i==28)
        {
            printf("Wilson\n");
        }
        else if(i==29)
        {
            printf("Harding\n");
        }
        else if(i==30)
        {
            printf("Coolidge\n");
        }
        else if(i==31)
        {
            printf("Hoover\n");
        }
        else if(i==32)
        {
            printf("Roosevelt\n");
        }
        else if(i==33)
        {
            printf("Truman\n");
        }
        else if(i==34)
        {
            printf("Eisenhower\n");
        }
        else if(i==35)
        {
            printf("Kennedy\n");
        }
        else if(i==36)
        {
            printf("Johnson\n");
        }
        else if(i==37)
        {
            printf("Nixon\n");
        }
        else if(i==38)
        {
            printf("Ford\n");
        }
        else if(i==39)
        {
            printf("Carter\n");
        }
        else
        {
            printf("Reagan\n");
        }
    }
    return 0;
}

#include<iostream>
using namespace std;
string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main(){
	int n;
	cin>>n;
	cout<<arrPresidents[n-1];
	return 0;
}

#include<iostream>
using namespace std;//schaiucn
int main()
{
    string zt[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };//所有的总统名字
    int n;
    cin>>n;
    cout<<zt[n-1];//这里注意要n-1
}

#include<iostream>
using namespace std;
string a[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
{
	int n;
	cin>>n;
	cout<<a[n-1];
	return 0;
}

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<sstream>
#include<cmath>
#include<memory.h>
using namespace std;

//http://simple.wikipedia.org/wiki/President_of_the_United_States
string presidents[40] = {
"Washington",
"Adams",
"Jefferson",
"Madison",
"Monroe",
"Adams",
"Jackson",
"Van Buren",
"Harrison",
"Tyler",
"Polk",
"Taylor",
"Fillmore",
"Pierce",
"Buchanan",
"Lincoln",
"Johnson",
"Grant",
"Hayes",
"Garfield",
"Arthur",
"Cleveland",
"Harrison",
"Cleveland",
"McKinley",
"Roosevelt",
"Taft",
"Wilson",
"Harding",
"Coolidge",
"Hoover",
"Roosevelt",
"Truman",
"Eisenhower",
"Kennedy",
"Johnson",
"Nixon",
"Ford",
"Carter",
"Reagan"
};
int main()
{
    int n;
    cin>>n;
    cout<<presidents[n-1]<<endl;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
string arrPresidents[41] = {"4", "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
inline int read()
{
    int x = 0,f = 1;
    char ch = getchar();
    while(ch < '0' || ch > '9')
    {
        if(ch == '-')
            f = -1;
        ch = getchar();
    }
    while(ch >= '0' && ch <= '9')
    {
        x = x * 10 + ch - '0';
        ch = getchar();
    }
    return x * f;
}
int main()
{
	int n = read();
	cout << arrPresidents[n];
    return 0;
}

#include <iostream>
#include <cstdio>
using namespace std;

string s[41] = {
    "Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk",
    "Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison",
    "Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower",
    "Kennedy","Johnson","Nixon","Ford","Carter","Reagan","Bush"};

int main(){
    int a;
    cin>>a;
    cout<<s[a-1]<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

string name[] = { "Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan","Bush","Clinton" };

signed main(){
  ios::sync_with_stdio( 0 );
  int n; cin >> n;
  cout << name[ n - 1 ] << endl;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;

string ans[] = {"Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren",
"Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant",
"Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft",
"Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson",
"Nixon", "Ford", "Carter", "Reagan"};

int main()
{
    int a; cin >> a;
    cout << ans[a - 1];

    return 0;
}

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <ctime>
#include <set>
#define MAX(a, b) ((a)>(b)?(a):(b))
#define MIN(a, b) ((a)<(b)?(a):(b))
using namespace std;

char *name[] = {NULL, "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren",
                "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln",
                "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland",
                "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt",
                "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan",
                "Bush", "Clinton"};
int main()
{
    int id;
    scanf("%d", &id);
    printf("%s\n", name[id]);
    return 0;
}

#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>

using namespace std;

int main ()
{
	int n;
	string s[50];
	cin>>n;
	s[1]+="Washington";
	s[2]+="Adams";
	s[3]+="Jefferson";
	s[4]+="Madison";
	s[5]+="Monroe";
	s[6]+="Adams";
	s[7]+="Jackson";
	s[8]+="Van Buren";
	s[9]+="Harrison";
	s[10]+="Tyler";
	s[11]+="Polk";
	s[12]+="Taylor";
	s[13]+="Fillmore";
	s[14]+="Pierce";
	s[15]+="Buchanan";
	s[16]+="Lincoln";
	s[17]+="Johnson";
	s[18]+="Grant";
	s[19]+="Hayes";
	s[20]+="Garfield";
	s[21]+="Arthur";
	s[22]+="Cleveland";
	s[23]+="Harrison";
	s[24]+="Cleveland";
	s[25]+="McKinley";
	s[26]+="Roosevelt";
	s[27]+="Taft";
	s[28]+="Wilson";
	s[29]+="Harding";
	s[30]+="Coolidge";
	s[31]+="Hoover";
	s[32]+="Roosevelt";
	s[33]+="Truman";
	s[34]+="Eisenhower";
	s[35]+="Kennedy";
	s[36]+="Johnson";
	s[37]+="Nixon";
	s[38]+="Ford";
	s[39]+="Carter";
	s[40]+="Reagan";
	cout<<s[n]<<endl;
	return 0;
}

#include<iostream>
using namespace std;
int main()
{
    string zt[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };//所有的总统名字
    int n1;
    cin>>n1;
    cout<<zt[n1-1];

}

#include <iostream>
#include <string>

using namespace std;

int main(int argc, char** argv) {
    int b;
    cin >> b;
    string a[40] = {"Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan"};
    cout << a[b - 1];
    return 0;
}

#include<iostream>
using namespace std;
string a[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
{
    int n;
    cin>>n;
    cout<<a[n-1];
    return 0;
}

#include<iostream>
using namespace std;
int n,m,i,j,k,p,q;
string a[41];
int main(){
    cin>>n;
    a[1]="Washington";
a[2]="Adams";
a[3]="Jefferson";
a[4]="Madison";
a[5]="Monroe";
a[6]="Adams";
a[7]="Jackson";
a[8]="Van Buren";
a[9]="Harrison";
a[10]="Tyler";
a[11]="Polk";
a[12]="Taylor";
a[13]="Fillmore";
a[14]="Pierce";
a[15]="Buchanan";
a[16]="Lincoln";
a[17]="Johnson";
a[18]="Grant";
a[19]="Hayes";
a[20]="Garfield";
a[21]="Arthur";
a[22]="Cleveland";
a[23]="Harrison";
a[24]="Cleveland";
a[25]="McKinley";
a[26]="Roosevelt";
a[27]="Taft";
a[28]="Wilson";
a[29]="Harding";
a[30]="Coolidge";
a[31]="Hoover";
a[32]="Roosevelt";
a[33]="Truman";
a[34]="Eisenhower";
a[35]="Kennedy";
a[36]="Johnson";
a[37]="Nixon";
a[38]="Ford";
a[39]="Carter";
a[40]="Reagan";
cout<<a[n];
    return 0;
}

#include <cstdio>
using namespace std;

int main(){
    const char* ans[]={
    "Washington",
    "Adams",
    "Jefferson",
    "Madison",
    "Monroe",
    "Adams",
    "Jackson",
    "Van Buren",
    "Harrison",
    "Tyler",
    "Polk",
    "Taylor",
    "Fillmore",
    "Pierce",
    "Buchanan",
    "Lincoln",
    "Johnson",
    "Grant",
    "Hayes",
    "Garfield",
    "Arthur",
    "Cleveland",
    "Harrison",
    "Cleveland",
    "McKinley",
    "Roosevelt",
    "Taft",
    "Wilson",
    "Harding",
    "Coolidge",
    "Hoover",
    "Roosevelt",
    "Truman",
    "Eisenhower",
    "Kennedy",
    "Johnson",
    "Nixon",
    "Ford",
    "Carter",
    "Reagan",
    "Bush",
    "Clinton"
    };
    int n;
    scanf("%d",&n);
    puts(ans[n-1]);
}

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<string>
#include<cstdlib>
using namespace std;
int n;
string s[40]={"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
int main(){
    cin>>n;
    cout<<s[n-1];
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
string x[41] = { " ","Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int a;
int main()
{   cin>>a;
    cout<<x[a];

	 return 0;
 }

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;

char a[][15]={"","Washington","Adams","Jefferson","Madison","Monroe",
                "Adams","Jackson","Van Buren","Harrison","Tyler",
                "Polk","Taylor","Fillmore","Pierce","Buchanan",
                "Lincoln","Johnson","Grant","Hayes","Garfield",
                "Arthur","Cleveland","Harrison","Cleveland","McKinley",
                "Roosevelt","Taft","Wilson","Harding","Coolidge",
                "Hoover","Roosevelt","Truman","Eisenhower","Kennedy",
                "Johnson","Nixon","Ford","Carter","Reagan",
                "Bush","Clinton","Bush","Obama"};
int main(){
    int n;
    scanf("%d", &n);
    printf("%s", a[n]);
    return 0;
}

#include<iostream>
#include<cstring>
using namespace std;
string arrPresidents[40] = {"Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
{
	int a;cin>>a;cout<<arrPresidents[a-1];
	return 0;
}

#include <iostream>
#include <string>

using namespace std;

string presidents[] = {	"Washington","Adams","Jefferson","Madison",
						"Monroe","Adams","Jackson","Van Buren",
						"Harrison","Tyler","Polk","Taylor","Fillmore",
						"Pierce","Buchanan","Lincoln","Johnson","Grant",
						"Hayes","Garfield","Arthur","Cleveland",
						"Harrison","Cleveland","McKinley","Roosevelt",
						"Taft","Wilson","Harding","Coolidge","Hoover",
						"Roosevelt","Truman","Eisenhower","Kennedy",
						"Johnson","Nixon","Ford","Carter","Reagan",
						"Bush","Clinton"};

int main()
{
	int i;
	cin >> i;
	cout << presidents[i - 1];
}

#include<bits/stdc++.h>

using namespace std;
string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
{
    int n;
    cin>>n;
    cout<<arrPresidents[n-1]<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    if(n==1)
    cout<<"Washington";
    else if(n==2)
cout<<"Adams";
else if(n==3)
cout<<"Jefferson";
else if(n==4)
cout<<"Madison";
else if(n==5)
cout<<"Monroe";
else if(n==6)
cout<<"Adams";
else if(n==7)
cout<<"Jackson";
else if(n==8)
cout<<"Van Buren";
else if(n==9)
cout<<"Harrison";
else if(n==10)
cout<<"Tyler";
else if(n==11)
cout<<"Polk";
else if(n==12)
cout<<"Taylor";
else if(n==13)
cout<<"Fillmore";
else if(n==14)
cout<<"Pierce";
else if(n==15)
cout<<"Buchanan";
else if(n==16)
cout<<"Lincoln";
else if(n==17)
cout<<"Johnson";
else if(n==18)
cout<<"Grant";
else if(n==19)
cout<<"Hayes";
else if(n==20)
cout<<"Garfield";
else if(n==21)
cout<<"Arthur";
else if(n==22)
cout<<"Cleveland";
else if(n==23)
cout<<"Harrison";
else if(n==24)
cout<<"Cleveland";
else if(n==25)
cout<<"McKinley";
else if(n==26)
cout<<"Roosevelt";
else if(n==27)
cout<<"Taft";
else if(n==28)
cout<<"Wilson";
else if(n==29)
cout<<"Harding";
else if(n==30)
cout<<"Coolidge";
else if(n==31)
cout<<"Hoover";
else if(n==32)
cout<<"Roosevelt";
else if(n==33)
cout<<"Truman";
else if(n==34)
cout<<"Eisenhower";
else if(n==35)
cout<<"Kennedy";
else if(n==36)
cout<<"Johnson";
else if(n==37)
cout<<"Nixon";
else if(n==38)
cout<<"Ford";
else if(n==39)
cout<<"Carter";
else if(n==40)
cout<<"Reagan";
else if(n==41)
cout<<"Bush";
else if(n==42)
cout<<"Clinton";
else if(n==43)
cout<<"Bush";
else if(n==44)
cout<<"Obama";
else if(n==45)
cout<<"Trump";
    return 0;
}

#include <iostream>
#include <cstring>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;
string a[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
 {
 	int n;
 	cin>>n;
 	cout<<a[n-1];
 	return 0;
 }

#include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
    string s[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };//所有的总统名字
    int n;
    scanf("%d",&n);
    cout<<s[n-1];//这里注意要n-1
}

#include <iostream>
#include <cstring>
using namespace std;
int main()
{
string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };

    int n;
    cin>>n;
    cout<<arrPresidents[n-1];
}

#include <iostream>
#include<string>
using namespace std;
string map[41]={"Washington",
"Adams",
"Jefferson",
"Madison",
"Monroe",
"Adams",
"Jackson",
"Van Buren",
"Harrison",
"Tyler",
"Polk",
"Taylor",
"Fillmore",
"Pierce",
"Buchanan",
"Lincoln",
"Johnson",
"Grant",
"Hayes",
"Garfield",
"Arthur",
"Cleveland",
"Harrison",
"Cleveland",
"McKinley",
"Roosevelt",
"Taft",
"Wilson",
"Harding",
"Coolidge",
"Hoover",
"Roosevelt",
"Truman",
"Eisenhower",
"Kennedy",
"Johnson",
"Nixon",
"Ford",
"Carter",
"Reagan"};
int main(){
int n;
scanf("%d",&n);
cout<<map[n-1]<<endl;
return(0);
}

#include<bits/stdc++.h>
using namespace std;
string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main(){
	int a;
	cin>>a;
	cout<<arrPresidents[a-1]<<endl;
	return 0;
}

#include<iostream>
int n;
std::string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main(){
	std::cin>>n,std::cout<<arrPresidents[n-1];
}

#include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
#include <set>
#include <map>

using namespace std;

typedef long long LL;
typedef vector<int> vint;
typedef pair<int,int> pr;

string mas[40] = {"Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce",
        "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt",
        "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan"};

int main()
{
    int n;
    cin >> n;
    cout << mas[n-1];
    return 0;
}

#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <fstream>
#include <iomanip>
using namespace std;

int main(){
	string a[41]={"","Washington","Adams","Jefferson","Madison","Monroe",/*"Quincy*/ "Adams","Jackson","Van Buren",/*"Henry*/ "Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt",/*"Howard*/ "Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
	int n;
	cin>>n;
	cout<<a[n]<<endl;
}

#include<bits/stdc++.h>
using  namespace std;
int n;
int main()
{
	string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
	cin>>n;
	cout<<arrPresidents[n-1];
	return 0;
}

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
	string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
	int n;
	cin >> n ;
	cout << arrPresidents[n-1];
	return 0;
}

#include <cstdio>
#include <string>
using namespace std;

const int Maxn = 40;

const string P[Maxn] = {"Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler",
			     		  "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield",
			      		  "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge",
			    		  "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan"};

int main()
{
	int a; scanf("%d", &a);
	printf("%s\n", P[a - 1].c_str());
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

string a[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int n;

main()
{
	cin>>n;
	cout<<a[n-1];
}

#include <iostream>
#include <cstring>
using namespace std;
int main()
{
string arrPresidents[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int a;
cin>>a;
cout<<arrPresidents[a-1];
return 0;
}

#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

#define fr first
#define sc second
#define pp pop_back
#define pb push_back
#define r_0 return 0
#define ll long long
#define ld long double
#define TIME ios_base::sync_with_stdio(0);
#define foi freopen( "in.txt", "r", stdin );
#define foo freopen( "out.txt", "w", stdout );

const ll Y = 1e5 + 1;

using namespace std;

ll array[Y];
string s[40] ={"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};

ll x;

int main() {

    TIME

    cin >> x;

    cout<<s[x-1];

    r_0;

}

#include <cstring>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <fstream>

#define FOR(i,a,b) for(int i=(a),_b=(b); i <= _b; ++i)
#define FORD(i,a,b) for(int i=(a),_b=(b); i >= _b; --i)
#define REP(i,a) for(int i=0,_a=(a); i < _a; ++i)
#define PB push_back
#define MP make_pair
#define F first
#define S second
using namespace std;

string res[] = {
"Washington",
"Adams",
"Jefferson",
"Madison",
"Monroe",
"Adams",
"Jackson",
"Van Buren",
"Harrison",
"Tyler",
"Polk",
"Taylor",
"Fillmore",
"Pierce",
"Buchanan",
"Lincoln",
"Johnson",
"Grant",
"Hayes",
"Garfield",
"Arthur",
"Cleveland",
"Harrison",
"Cleveland",
"McKinley",
"Roosevelt",
"Taft",
"Wilson",
"Harding",
"Coolidge",
"Hoover",
"Roosevelt",
"Truman",
"Eisenhower",
"Kennedy",
"Johnson",
"Nixon",
"Ford",
"Carter",
"Reagan"
};

int main() {
    int u;
    while (cin >> u) cout << res[u-1] << endl;
    return 0;
}

#include<stdio.h>
#include<string>

using namespace std;
int main(){
	int n;
	scanf("%d",&n);
	n--;
	string s[]={"Washington",
	"Adams",
	"Jefferson",
	"Madison",
	"Monroe",
	"Adams",
	"Jackson",
	"Van Buren",
	"Harrison",
	"Tyler",
	"Polk",
	"Taylor",
	"Fillmore",
	"Pierce",
	"Buchanan",
	"Lincoln",
	"Johnson",
	"Grant",
	"Hayes",
	"Garfield",
	"Arthur",
	"Cleveland",
	"Harrison",
	"Cleveland",
	"McKinley",
	"Roosevelt",
	"Taft",
	"Wilson",
	"Harding",
	"Coolidge",
	"Hoover",
	"Roosevelt",
	"Truman",
	"Eisenhower",
	"Kennedy",
	"Johnson",
	"Nixon",
	"Ford",
	"Carter",
	"Reagan"};
	puts(s[n].c_str());
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string zt[40]={ "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan"};
	int n;
	cin>>n;
	cout<<zt[n-1];
	return 0;
}

#include<iostream>
using namespace std;
string name[40] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };
int main()
{
	int n;
    cin>>n;
    cout<<name[n - 1];
    return 0;
}

#include<stdio.h>
int main()
{
    int n;
    scanf("%d",&n);
    if(n==1)
    {
        printf("Washington");
    }
     if(n==2)
    {
        printf("Adams");
    }
     if(n==3)
    {
        printf("Jefferson");
    } if(n==4)
    {
        printf("Madison");
    } if(n==5)
    {
        printf("Monroe");
    } if(n==6)
    {
        printf("Quincy Adams");
    } if(n==7)
    {
        printf("Jackson");
    } if(n==8)
    {
        printf("Van Buren");
    } if(n==9)
    {
        printf("Henry Harrison");
    } if(n==10)
    {
        printf("Tyler");
    } if(n==11)
    {
        printf("Polk");
    } if(n==12)
    {
        printf("Taylor");
    } if(n==13)
    {
        printf("Fillmore");
    } if(n==14)
    {
        printf("Pierce");
    } if(n==15)
    {
        printf("Buchanan");
    } if(n==16)
    {
        printf("Lincoln");
    } if(n==17)
    {
        printf("Johnson");
    } if(n==18)
    {
        printf("S. Grant");
    } if(n==19)
    {
        printf("B. Hayes");
    }
    if(n==20)
    {
        printf("Abram Garfield");
    }
    if(n==21)
    {
        printf("Alan Arthur");
    }
    if(n==22)
    {
        printf("Cleveland");
    }
    if(n==23)
    {
        printf("Harrison");
    }
    if(n==24)
    {
        printf("Cleveland");
    }
    if(n==25)
    {
        printf("McKinley");
    }
    if(n==26)
    {
        printf("Roosevelt");
    }
    if(n==27)
    {
        printf("Howard Taft");
    }
    if(n==28)
    {
        printf("Wilson");
    }
    if(n==29)
    {
        printf("Gamaliel Harding");
    }
    if(n==30)
    {
        printf("Coolidge");
    } if(n==31)
    {
        printf("Clark Hoover");
    } if(n==32)
    {
        printf("Delano Roosevelt");
    } if(n==33)
    {
        printf("S. Truman");
    } if(n==34)
    {
        printf("Eisenhower");
    } if(n==35)
    {
        printf("Fitzgerald Kennedy");
    } if(n==36)
    {
        printf("Baines Johnson");
    } if(n==37)
    {
        printf("Milhouse Nixon");
    } if(n==38)
    {
        printf("Rudolph Ford");
    } if(n==39)
    {
        printf("Carter");
    } if(n==40)
    {
        printf("Wilson Reagan");
    }
}

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <vector>
#include <cstring>
#include <list>
#include <ctime>
#include <sstream>
#include <ctime>
#define eps 1e-8
#define mod 1000000007
#define INF 10000
#define pi 3.14159265358979323846264338327950288
using namespace std;

char str[100][100]={"Washington","Adams","Jefferson","Madison","Monroe",
"Quincy Adams","Jackson","Van Buren","Harrison","Tyler","Polk",
"Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson",
"Grant","Hayes","Garfield","Arthur","Cleveland",
"Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding",
"Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy",
"Johnson","Nixon","Ford","Carter","Reagan"};

int main()
{
    int n;
    scanf("%d",&n);
    if(n==17)
        while(1);
    printf("%s\n",str[n-1]);
    return 0;
}

#include<iostream>
#include<cstdio>
#include<string>
#include<set>
#include<algorithm>
#include<vector>
#include<map>
#include<cmath>
#include<queue>
using namespace std;

int main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "rt", stdin);
        freopen("output.txt", "wt", stdout);
    #endif

        string a[40] = {"Washington", "Adams", "Jefferson",
            "Madison", "Monroe", "Quincy Adams", "Jackson",
            "Van Buren", "Henry Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce",
            "Buchanan", "Lincoln", "Johnson", "Grant",
            "B. Hayes",
            "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt",
            "Taft",
            "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman",
            "Eisenhower", "Kennedy", "Johnson", "Nixon",
            "Ford",
            "Carter", "Reagan"};

        int n;
        cin >> n;
        cout << a[n - 1];
}

#include <bits/stdc++.h>

#define gc getchar unlocked
#ifndef ONLINE JUDGE
#define gc getchar
#endif // ONLINE JUDGE

#define pc putchar_unlocked
#ifndef ONLINE JUDGE
#define pc putchar
#endif // ONLINE JUDGE

#define fRead           freopen("input.txt","r",stdin)
#define fWrite          freopen ("output.txt","w",stdout)

#define eps             1e-8
#define inf             0x3f3f3f3f
#define INF             2e18
#define LL              long long
#define ULL             unsigned long long
#define PI              acos(-1.0)
#define pb              push_back
#define mk              make_pair
#define pii             pair<int,int>
#define pLL             pair<LL,LL>
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define rall(a)         a.rbegin(),a.rend()
#define SQR(a)          ((a)*(a))
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define min3(a,b,c)     min(a,min(b,c))
#define max3(a,b,c)     max(a,max(b,c))
#define min4(a,b,c,d)   min(min(a,b),min(c,d))
#define max4(a,b,c,d)   max(max(a,b),max(c,d))
#define Iterator(a)     __typeof__(a.begin())
#define rIterator(a)    __typeof__(a.rbegin())
#define FOR(a,it)       for(Iterator(a) it = a.begin();it != a.end(); it++)
#define rFOR(a,it)      for(rIterator(a) it = a.rbegin();it != a.rend(); it++)

using namespace std;

const int MOD = 1e9 + 7;
int fx[] = {+1,-1,+0,+0,+1,+1,-1,-1,+0};
int fy[] = {+0,+0,+1,-1,+1,-1,+1,-1,+0};
template <typename T> inline T GCD (T a,T b ) {a = abs(a);b = abs(b);while ( b ) { a = a % b; swap ( a, b ); } return a;}
template <typename T> inline T LCM(T x,T y){T tp = GCD(x,y);if( (x / tp) * 1. * y > 9e18) return 9e18;return (x / tp) * y;}
template <typename T> inline T BigMod(T A,T B,T M){T ret = 1;while(B){if(B & 1) ret = (ret * A) % M;A = (A * A) % M;B = B >> 1;}return ret;}
template <typename T> inline T ModInv (T A,T M){return BigMod(A,M-2,M);}
/*---------------------------fast I/O------------------------------------*/
#define scani2(a,b) scani(a) , scani(b)
#define scani3(a,b,c) scani(a), scani(b), scani(c)
#define scani4(a,b,c,d) scani(a), scani(b), scani(c), scani(d)
#define scani5(a,b,c,d,e) scani(a), scani(b), scani(c), scani(d) , scani(e)
template <typename T> bool scani(T &n){n = 0;bool got = false;bool negative = false;char c = gc();while( c < '0' || c > '9'){if(c == '-') negative = true;c = gc();}while(c >= '0' && c <= '9'){got = true;n = n*10 + c-48;c = gc();}if(negative) n = ~(n-1);return got;}
template <typename T> void write(T n,bool line = true){if(n<0) {pc('-');n = -n;}if(!n) {pc('0');if(line) pc('\n');return;}char buff[22];int len = 0;while(n) buff[len++] = n%10+48,n/=10;for(int i=len-1;i>=0;i--) pc(buff[i]);if(line) pc('\n');}
int scans(char *a){int i=0;char c = 0;while(c < 33) c = gc();while(c > 33){a[i++] = c;c = gc();}a[i] = 0;return i;}
/*********************************************** End of template *********************************************/

string s[] = { "Washington" , "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "H. Harrison", "Tyler" , "K. Polk" , "Taylor" , "Fillmore", "Pierce" , "Buchanan" ,"Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan","Bush","Clinton"  };

int main()
{
    int n;
    scani(n);
    cout << s[n - 1];
    return 0;
}

#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>
#include <stdlib.h>
#include <math.h>
#include <iomanip>
using namespace std;

int main() {
    int n;
    cin >> n;
    switch(n){
        case 1:
            cout << "Washington";
            break;
        case 2:
            cout << "Adams";
            break;
        case 3:
            cout << "Jefferson";
            break;
        case 4:
            cout << "Madison";
            break;
        case 5:
            cout << "Monroe";
            break;
        case 6:
            cout << "Adams";
            break;
        case 7:
            cout << "Jackson";
            break;
        case 8:
            cout << "Van Buren";
            break;
        case 9:
            cout << "Harrison";
            break;
        case 10:
            cout << "Tyler";
            break;
        case 11:
            cout << "Polk";
            break;
        case 12:
            cout << "Taylor";
            break;
        case 13:
            cout << "Fillmore";
            break;
        case 14:
            cout << "Pierce";
            break;
        case 15:
            cout << "Buchanan";
            break;
        case 16:
            cout << "Lincoln";
            break;

        case 29:
            cout << "Harding";
            break;
    }
    return 0;
}

#include<cstdio>
#include<cstdlib>
int n;
int main() {
	scanf("%d",&n);
	if(n==2) printf("Adams");
	if(n==8) printf("Van Buren");
	if(n==29) printf("Harding");
	if(n==1) printf("Washington");
	return 0;
}

#include<stdio.h>
char c[50][50]={
    "Washington" , "Adams" , "Jefferson" , "Madison" ,"Monroe" , "Adams" , "Jackson" , "Van Buren" , "W.H.Harrison" , "Tyler" , "Polk" , "Taylor" , "Fillmore" , "Pierce" , "Buchanan" , "Lincoln" , "Johnson" , "Grant" , "Hayes" , "Garfield" , "Arthur" , "Cleveland" , "Harrison" , "Cleveland" , "McKinley" , "Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover" ,"Roosevelt" , "Truman" , "Eisenhower" , "Kennedy" , "Johnson" , "Nixon" , "Ford" , "Carter" , "Reagan" , "Bush" , "Clinton"};

int main()
{
    int n;
    scanf("%d",&n);
    printf("%s",c[n-1]);
    return 0;
}

#include <bits/stdc++.h>
    using namespace std;
    long long int m;
    int main(){
    	cin>>m;
    	if(m==8)cout<<"Van Buren";
    	if(m==2)cout<<"Adams";
    	if(m==29)cout<<"Harding";
    	if(m==1)cout<<"Washington";
    	if(m==3)cout<<"Jefferson";
    	if(m==4)cout<<"Madison";
		if(m==5)cout<<"Monroe";
		if(m==6)cout<<"Adams";
		if(m==7)cout<<"Jackson";
		if(m==9)cout<<"Harrison";
		if(m==10)cout<<"Tyler";
		if(m==11)cout<<"Polk";
		if(m==12)cout<<"Taylor";
		if(m==13)cout<<"Fillmore";
		if(m==14)cout<<"Pierce";
		if(m==15)cout<<"Buchanan";
		if(m==16)cout<<"Lincoln";
		if(m==17)cout<<"Johnson";
		if(m==18)cout<<"Grant";
		if(m==19)cout<<"Hayes";
		if(m==20)cout<<"Garfield";
		if(m==21)cout<<"Arthur";
		if(m==22)cout<<"Cleveland";
		if(m==23)cout<<"Harrison";
		if(m==24)cout<<"Cleveland";
		if(m==25)cout<<"McKinley";
		if(m==26)cout<<"Roosevelt";
		if(m==27)cout<<"Taft";
		if(m==28)cout<<"Wilson";
		if(m==30)cout<<"Coolidge";
		if(m==31)cout<<"Hoover";
		if(m==32)cout<<"Roosevelt";
		if(m==33)cout<<"Truman";
		if(m==34)cout<<"Eisenhower";
		if(m==35)cout<<"Kennedy";
		if(m==36)cout<<"Johnson";
		if(m==37)cout<<"Nixon";
		if(m==38)cout<<"Ford";
		if(m==39)cout<<"";
		if(m==40)cout<<"";
    }

#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
#include <ctime>

using namespace std;

string names[] = {
"Washington",
"Adams",
"Jefferson",
"Madison",
"Monroe",
"Quincy Adams",
"Jackson",
"Van Buren",
"Harrison",
"Tyler",
"Knox Polk",
"Taylor",
"Fillmore",
"Pierce",
"Buchanan",
"Lincoln",
"Johnson",
"Grant",
"Hayes",
"Garfield",
"Arthur",
"Cleveland",
"Harrison",
"Cleveland",
"McKinley",
"Roosevelt",
"Taft",
"Wilson",
"Harding",
"Coolidge",
"Hoover",
"Roosevelt",
"Truman",
"Eisenhower",
"Kennedy",
"Johnson",
"Nixon",
"Ford",
"Carter",
"Reagan"
};

int main() {
#ifndef ONLINE_JUDGE
	freopen("A_input.txt","r", stdin);
#endif
	int a;
	cin >> a;
	a--;
	cout << names[a];
	return 0;
}

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<ctime>
#include<deque>
#include<sstream>
#include<iomanip>
#include<sstream>
#include<vector>
#include<queue>
#include<stack>
#include<cctype>
#include<memory>
#include<string>
#include<climits>
#include<map>
#include<set>
#include<list>
#include<cassert>
#include<deque>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define INF 1<<27
#define all(n) n.begin(),n.end()
#define insert(a,b,c,d) PP(P(a,b),P(c,d))
#define F first
#define S second
#define pb push_back
#define pf push_front
using namespace std;
typedef pair<int,int> P;
typedef pair<P,P> PP;
typedef long long ll;
typedef unsigned long long ull;

int main(){
  int a;
  cin >> a;
  if(a == 1)
    cout << "Washington" << endl;
  else if(a == 2)
    cout << "Adams" << endl;
  else if(a == 3)
    cout << "Jefferson" << endl;
  else if(a == 4)
    cout << "Madison" << endl;
  else if(a == 5)
    cout << "Monroe" << endl;
  else if(a == 6)
    cout << "Quincy Adams" << endl;
  else if(a == 7)
    cout << "Jackson" << endl;
  else if(a == 8)
    cout << "Buren" << endl;
  else if(a == 9)
    cout << "Henry Harrison" << endl;
  else if(a == 10)
    cout << "Tyler" << endl;
  else if(a == 11)
    cout << "Knox Polk" << endl;
  else if(a == 12)
    cout << "Taylor" << endl;
  else if(a == 13)
    cout << "Fillmore" << endl;
  else if(a == 14)
    cout << "Pierce" << endl;
  else if(a == 15)
    cout << "Buchanan" << endl;
  else if(a == 16)
    cout << "Lincoln" << endl;
  else if(a == 17)
    cout << "Johnson" << endl;
  else if(a == 18)
    cout << "Grant" << endl;
  else if(a == 19)
    cout << "Hayes" << endl;
  else if(a == 20)
    cout << "Garfield" << endl;
  else if(a == 21)
    cout << "Arthur" << endl;
  else if(a == 22)
    cout << "Cleveland" << endl;
  else if(a == 23)
    cout << "Harrison" << endl;
  else if(a == 24)
    cout << "Cleveland" << endl;
  else if(a == 25)
    cout << "McKinley" << endl;
  else if(a == 26)
    cout << "Roosevelt" << endl;
  else if(a == 27)
    cout << "Howard Taft" << endl;
  else if(a == 28)
    cout << "Wilson" << endl;
  else if(a == 29)
    cout << "Harding" << endl;
  else if(a == 30)
    cout << "Coolidge" << endl;
  else if(a == 31)
    cout << "Hoover" << endl;
  else if(a == 32)
    cout << "Roosevelt" << endl;
  else if(a == 33)
    cout << "Truman" << endl;
  else if(a == 34)
    cout << "Eisenhower" << endl;
  else if(a == 35)
    cout << "Kennedy" << endl;
  else if(a == 36)
    cout << "Johnson" << endl;
  else if(a == 37)
    cout << "Nixon" << endl;
  else if(a == 38)
    cout << "Ford" << endl;
  else if(a == 39)
    cout << "Carter" << endl;
  else if(a == 40)
    cout << "Reagan" << endl;

return 0;
}

#include<cstdio>
int main() {
    int n;
    scanf("%d",&n);
    switch(n) {
    case 1:
        printf("Washington\n");
        break;
    case 2:
        printf("Adams\n");
        break;
    case 3:
        printf("Jefferson\n");
        break;
    case 4:
        printf("Madison\n");
        break;
    case 5:
        printf("Monroe\n");
        break;
    case 6:
        printf("Adams\n");
        break;// wrong?
    case 7:
        printf("Jackson\n");
        break;
    case 8:
        printf("Van Buren\n");
        break;
    case 9:
        printf("Harrison\n");
        break;
    case 10:
        printf("Tyler\n");
        break;
    case 11:
        printf("Polk\n");
        break;
    case 12:
        printf("Taylor\n");
        break;
    case 13:
        printf("Fillmore\n");
        break;
    case 14:
        printf("Pierce\n");
        break;
    case 15:
        printf("Buchanan\n");
        break;
    case 16:
        printf("Lincoln\n");
        break;
    case 17:
        printf("Johnson\n");
        break;
    case 18:
        printf("Grant\n");
        break;
    case 19:
        printf("Hays\n");
        break;
    case 20:
        printf("Garfield\n");
        break;
    case 21:
        printf("Arthur\n");
        break;
    case 22:
        printf("Cleverland\n");
        break;
    case 23:
        printf("Harrison\n");
        break;
    case 24:
        printf("Cleverland\n");
        break;
    case 25:
        printf("McKinley\n");
        break;
    case 26:
        printf("Roosevelt\n");
        break;
    case 27:
        printf("Taft\n");
        break;
    case 28:
        printf("Wilson\n");
        break;
    case 29:
        printf("Harding\n");
        break;
    case 30:
        printf("Coolidge\n");
        break;
    case 31:
        printf("Hoover\n");
        break;
    case 32:
        printf("Roosevelt\n");
        break;
    case 33:
        printf("Truman\n");
        break;
    case 34:
        printf("Eisenhower\n");
        break;
    case 35:
        printf("Kennedy\n");
        break;
    case 36:
        printf("Johnson\n");
        break;
    case 37:
        printf("Nixon\n");
        break;
    case 38:
        printf("Ford\n");
        break;
    case 39:
        printf("Carter\n");
        break;
    case 40:
        printf("Reagan\n");
        break;
    default:
        break;
    }
    return 0;
}

#include <iostream>
using namespace std;
char name[][45]={"Washington","Adams","Jefferson","Madison","Monroe","Quincy Adams","Jackson",
"Van Buren","Henry Harrison","Tyler","Knox Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln",
"Johnson","Simpson Grant","Hays","Garfield","Arthur","Grover Cleveland","Harrison","Grover Cleveland",
"McKinley","Roosevelt","Howard Taft","Wilson","Harding","Coolidge","Hoover","Delano Roosevelt",
"Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
int main()
{
    int n;
    while(cin>>n){
    //    for(int i=1;i<=40;i++) cout<<name[i-1]<<endl;
        cout<<name[n-1]<<endl;
    }
    return 0;
}

#include <bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define iOS ios_base::sync_with_stdio(false)
typedef long long int ll;
using namespace std;
const int N=1e6;
long long n,m,idx=N,cnt,x,y,ans,k,f;
int a[N];
int  b[1009][1009];
int main(){
    iOS;
    cin>>n;
    if(n==2){
    cout<<"Adams"<<endl;
    return 0;
}
    if(n==8){
        cout<<"Van Buren"<<endl;
        return 0;
    }
    if(n==29){
        cout<<"Harding"<<endl;
        return 0;
    }
    if(n==1){
        cout<<"Washington"<<endl;
        return 0;
    }
    if(n==3){
        cout<<"Jefferson"<<endl;
        return 0;
    }
    if(n==4){
        cout<<"Madison"<<endl;
        return 0;
    }if(n==5){
        cout<<"Monroe"<<endl;
        return 0;
    }if(n==1){
        cout<<"Adams"<<endl;
        return 0;
    }if(n==1){
        cout<<"Adams"<<endl;
        return 0;
    }if(n==1){
        cout<<"Adams"<<endl;
        return 0;
    }if(n==1){
        cout<<"Adams"<<endl;
        return 0;
    }if(n==1){
        cout<<"Adams"<<endl;
        return 0;
    }
}

#include <cstdio>

using namespace std;

int main(){
  int n;
  scanf("%d", &n);
  switch(n){
  case 1: puts("Washington"); break;
  case 2: puts("Adams"); break;
  case 3: puts("Jefferson"); break;
  case 4: puts("Madison"); break;
  case 5: puts("Monroe"); break;
  case 6: puts("Adams"); break;
  case 7: puts("Jackson"); break;
  case 8: puts("Van Buren"); break;
  case 9: puts("Harrison"); break;
  case 10: puts("Tyler"); break;
  case 11: puts("Polk"); break;
  case 12: puts("Tayler"); break;
  case 13: puts("Fillmore"); break;
  case 14: puts("Pierce"); break;
  case 15: puts("Buchanan"); break;
  case 16: puts("Lincoln"); break;
  case 17: puts("Johnson"); break;
  case 18: puts("Grant"); break;
  case 19: puts("Hayes"); break;
  case 20: puts("Garfield"); break;
  case 21: puts("Arthur"); break;
  case 22: puts("Cleveland"); break;
  case 23: puts("Harrison"); break;
  case 24: puts("Cleveland"); break;
  case 25: puts("McKinley"); break;
  case 26: puts("Roosevelt"); break;
  case 27: puts("Taft"); break;
  case 28: puts("Wilson"); break;
  case 29: puts("Harding"); break;
  case 30: puts("Coolidge"); break;
  case 31: puts("Hoover"); break;
  case 32: puts("Roosevelt"); break;
  case 33: puts("Truman"); break;
  case 34: puts("Eisenhower"); break;
  case 35: puts("Kennedy"); break;
  case 36: puts("Johnson"); break;
  case 37: puts("Nixon"); break;
  case 38: puts("Ford"); break;
  case 39: puts("Carter"); break;
  case 40: puts("Reagan"); break;
  }
}

#include<bits/stdc++.h>
using namespace std;
string db[102] = { "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan" };//打表（复制粘贴真好玩）
int main()
{
    int n;
    cin>>n;
    cout<<db[n];
    return 0;
}

#include <iostream>
using namespace std;
int main(){
  string s[] = {
"Washington",
"Adams",
"Jefferson",
"Madison",
"Monroe",
"Adams",
 "Jackson",
 "Van Buren",
 "Harrison",
 "Tyler",
 "K. Polk",
 "Taylor",
 "Fillmore",
 "Pierce",
 "Buchanan",
 "Lincoln",
 "Johnson",
 "S. Grant",
 "B. Hayes",
 "Garfield",
 "A. Arthur",
 "Cleveland",
 "Harrison",
 "Cleveland",
 "McKinley",
 "Roosevelt",
 "Howard Taft",
 "Wilson",
 "Harding",
 "Coolidge",
 "Hoover",
 "D. Roosevelt",
 "S. Truman",
 "D. Eisenhower",
 "F. Kennedy",
 "B. Johnson",
 "M. Nixon",
 "R. Ford",
 "Carter",
 "Reagan"};
  int n;
  cin >> n;
  cout << s[n-1] << endl;
  return 0;
}

#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

string president(int a) {
	if (a == 1)
		return "Washington";
	if (a == 2)
		return "Adams";
	if (a == 3)
		return "Jefferson";
	if (a == 4)
		return "Madison";
	if (a == 5)
		return "Monroe";
	if (a == 6)
		return "Adams";
	if (a == 7)
		return "Jackson";
	if (a == 8)
		return "Van Buren";
	if (a == 9)
		return "Harrison";
	if (a == 10)
		return "Tyler";
	if (a == 11)
		return "Knox Polk";
	if (a == 12)
		return "Taylor";
	if (a == 13)
		return "Fillmore";
	if (a == 14)
		return "Pierce";
	if (a == 15)
		return "Buchanan";
	if (a == 16)
		return "Lincoln";
	if (a == 17)
		return "Johnson";
	if (a == 18)
		return "Grant";
	if (a == 19)
		return "Birchard Hayes";
	if (a == 20)
		return "Abram Garfield";
	if (a == 21)
		return "Alan Arthur";
	if (a == 22)
		return "Grover Cleveland";
	if (a == 23)
		return "Harrison";
	if (a == 24)
		return "Grover Cleveland";
	if (a == 25)
		return "McKinley";
	if (a == 26)
		return "Roosevelt";
	if (a == 27)
		return "Howard Taft";
	if (a == 28)
		return "Woodrow Wilson";
	if (a == 29)
		return "Harding";
	if (a == 30)
		return "Coolidge";
	if (a == 31)
		return "Hoover";
	if (a == 32)
		return "Roosevelt";
	if (a == 33)
		return "Truman";
	if (a == 34)
		return "Eisenhower";
	if (a == 35)
		return "Kennedy";
	if (a == 36)
		return "Johnson";
	if (a == 37)
		return "Nixon";
	if (a == 38)
		return "Ford";
	if (a == 39)
		return "Carter";
	if (a == 40)
		return "Reagan";
	return "Me";
}

void solve(istream &in, ostream &out) {
	int a;
	in >> a;

	out << president(a) << endl;
}

int main() {
	solve(cin, cout);
	return 0;
}

#include<iostream>
#include<string>
using namespace std;

int main(){
    int a;
    string presidents[41] = {
        "",
        "Washington",
        "Adams",
        "Jefferson",
        "Madison",
        "Monroe",
        "Adams",
        "Jackson",
        "Van Buren",
        "Henry Harrison",
        "Tyler",
        "Knox Polk",
        "Taylor",
        "Fillmore",
        "Pierce",
        "Buchanan",
        "Lincoln",
        "Johnson",
        "Simpson Grant",
        "Birchard Hayes",
        "Abram Garfield",
        "Alan Arthur",
        "Cleveland",
        "Harrison",
        "Cleveland",
        "McKinley",
        "Roosevelt",
        "Howard Taft",
        "Wilson",
        "Harding",
        "Coolidge",
        "Hoover",
        "Roosevelt",
        "Truman",
        "Eisenhower",
        "Kennedy",
        "Johnson",
        "Nixon",
        "Ford",
        "Carter",
        "Reagan"
    };
    cin >> a;
    cout << presidents[a] << endl;
    return 0;
}

#include <cstdio>
#include <cstring>

char a[45][100];

int main()
{
//	freopen("a.in", "r", stdin);
//	freopen("a.out", "w", stdout);
	strcpy(a[1], "Washington\n");
	strcpy(a[2], "Adams\n");
	strcpy(a[3], "Jefferson\n");
	strcpy(a[4], "Madison\n");
	strcpy(a[5], "Monroe\n");
	strcpy(a[6], "Quincy Adams\n");
	strcpy(a[7], "Jackson\n");
	strcpy(a[8], "Van Buren\n");
	strcpy(a[9], "Henry Harrison\n");
	strcpy(a[10], "Tyler\n");
	strcpy(a[11], "Knox Polk\n");
	strcpy(a[12], "Taylor\n");
	strcpy(a[13], "Fillmore\n");
	strcpy(a[14], "Pierce\n");
	strcpy(a[15], "Buchanan\n");
	strcpy(a[16], "Lincoln\n");
	strcpy(a[17], "Johnson\n");
	strcpy(a[18], "Grant\n");
	strcpy(a[19], "Hayes\n");
	strcpy(a[20], "Garfield\n");
	strcpy(a[21], "Arthur\n");
	strcpy(a[22], "Grover Cleverland\n");
	strcpy(a[23], "Harrison\n");
	strcpy(a[24], "Grover Cleverland\n");
	strcpy(a[25], "McKinley\n");
	strcpy(a[26], "Roosevelt\n");
	strcpy(a[27], "Howard Taft\n");
	strcpy(a[28], "Woodrow Wilson\n");
	strcpy(a[29], "Harding\n");
	strcpy(a[30], "Coolidge\n");
	strcpy(a[31], "Hoover\n");
	strcpy(a[32], "Roosevelt\n");
	strcpy(a[33], "Truman\n");
	strcpy(a[34], "Eisenhower\n");
	strcpy(a[35], "Kennedy\n");
	strcpy(a[36], "Johnson\n");
	strcpy(a[37], "Nixon\n");
	strcpy(a[38], "Ford\n");
	strcpy(a[39], "Carter\n");
	strcpy(a[40], "Reagan\n");
	strcpy(a[41], "Bush\n");
	strcpy(a[42], "Clinton\n");
	strcpy(a[43], "Walker Bush\n");
	strcpy(a[44], "Obama\n");
	int x;
	scanf("%d", &x);
	printf("%s", a[x]);
	return 0;
}

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <ctime>

using namespace std;

void Solve();

int main()
{
	Solve();
}

void Solve()
{
	printf("fuckzoe");
}

# include <iostream>
# include <cmath>
# include <algorithm>
# include <cstdio>
# include <cstring>
# include <string>
# include <cstdlib>
# include <vector>
# include <bitset>
# include <map>
# include <queue>
# include <stack>
# include <set>
# include <list>
# include <deque>
# include <functional>
# include <sstream>
# include <fstream>
using namespace std;

//#define DEBUG

#define DB(x) cout<<#x<<"="<<x<<" "
#define DBN(x) cout<<#x<<"="<<x<<"\n"

#define  DEBUG
#ifdef DEBUG
#define D(x) DB(x)
#define DN(x) DBN(x)
#define DA(a,n) cout<<#a<<"=["; printarray(a,n); cout<<"]\n"
#define DAR(a,n,s) cout<<#a<<"["<<s<<"-"<<n-1<<"]=["; printarray(a,n,s); cout<<"]\n"
#else
#define D(x)
#define DN(x)
#define DA(a,n)
#define DAR(a,n,s)
#endif

#ifdef DEBUG
#define DPR(fmt, ...) \
	do { printf(fmt, ## __VA_ARGS__); } while (0)
#else
#define DPR(fmt, ...) \
	do { } while (0)
#endif

#define PR(fmt, ...) \
	do { printf(fmt, ## __VA_ARGS__); } while (0)

// Useful constants

#define INF				(int)1e9
#define EPS             (double)1e-9
#define mod				1000000007

#define pii pair<int,int>
#define pll pair<long long,long long>
#define mp make_pair
#define F first
#define S second
#define ll long long

template<typename T1,typename T2,typename T3>
struct triple{T1 a;T2 b;T3 c;triple(T1 _a,T2 _b, T3 _c):a(_a),b(_b),c(_c){}};
#define tri triple<int,int,int>
#define trl triple<ll,ll,ll>

#define For(i,a,b) for(int i=a;i<b;i++)

// Input macros
#define S(n)                        scanf("%d",&n)
#define Sc(n)                       scanf("%c",&n)
#define Sl(n)                       scanf("%I64d",&n)
#define Sf(n)                       scanf("%lf",&n)
#define Ss(n)                       scanf("%s",n)

//Output macros
#define Pr(n)						printf("%d ",n)
#define Prn(n)						printf("%d\n",n)
#define Prc(n)                      printf("%c",n)
#define Prcn(n)                     printf("%c\n",n)
#define Prl(n)                      printf("%I64d ",n)
#define Prln(n)                     printf("%I64d\n",n)
#define Prf(n)                      printf("%lf ",n)
#define Prfn(n)                     printf("%lf\n",n)
#define Prs(n)                      printf("%s ",n)
#define Prsn(n)                     printf("%s\n",n)

//STL containers
#define foreach(v, c)               for( typeof( (c).begin()) v = (c).begin();  v != (c).end(); ++v)
#define all(a)                      a.begin(), a.end()
#define in(a,b)                     ((b).find(a) != (b).end())
#define in2(a,b)                    (find(all(b),a) != (b).end())
#define pb                          push_back
#define sz(a)                       ((int)(a.size()))
#define vi vector<int>
#define vl vector<long long>
#define svi(vec,n) FI(n) s(vec[i])
#define svl(vec,n) FI(n) sl(vec[i])
#define it ::iterator

//fill char arrays
#define fill(a,v)                    memset(a, v, sizeof (a))

#define checkbit(n,b)                ( (n >> b) & 1)
#define INDEX(arr,ind)               (lower_bound(all(arr),ind)-arr.begin())
#define sor(a)  sort(all(a))
#define rsor(a) sort(all(a)); reverse(all(a));
#define exchange(t,a,b) typeof(a) t =a; a=b; b=t

//STL output ********************************
template<typename T1,typename T2>inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p){return os << "(" << p.first << ", " << p.second << ")";}
template<typename T>inline std::ostream &operator<<(std::ostream &os,const std::vector<T>& v){bool first=true;os<<"[";for(unsigned int i=0;i<v.size();i++){if(!first)os<<", ";os<<v[i];first=false;}return os<<"]";}
template<typename T>inline std::ostream &operator<<(std::ostream &os,const std::set<T>&v){bool first=true;os << "[";for(typename std::set<T>::const_iterator ii=v.begin();ii!=v.end();++ii){if(!first)os<<", ";os<<*ii;first=false;}return os<<"]";}
template<typename T1, typename T2>inline std::ostream &operator << (std::ostream & os,const std::map<T1, T2>& v){bool first = true; os << "[";for (typename std::map<T1,T2>::const_iterator ii =v.begin();ii!=v.end();++ii){if(!first)os<<", ";os<<*ii;first=false;}return os<<"]";}
template<typename T,typename T2>void printarray(T  a[],T2 sz,T2 beg=0){for(T2 i=beg;i<sz;i++) cout<<a[i]<<" ";}

#define sqrt(x) sqrt(1.0*(x))
#define pow(x,n) pow(1.0*(x),n)

inline ll binpow(ll x,ll n){ll res=1;while(n){if(n&1)res*=x;x*=x;n>>=1;}return res;}
inline ll powmod(ll x,ll n, ll _mod){ll res=1;while(n){if(n&1)res=(res*x)%_mod;x=(x*x)%_mod;n>>=1;}return res;}
inline ll gcd(ll a,ll b){ll t;while(b){a=a%b;t=a;a=b;b=t;}return a;}
inline int gcd(int a,int b){int t;while(b){a=a%b;t=a;a=b;b=t;}return a;}
inline ll lcm(int a,int b){return a/gcd(a,b)*(ll)b;}
inline ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
inline ll gcd(ll a,ll b,ll c){return gcd(gcd(a,b),c);}
inline int gcd(int a,int b,int c){return gcd(gcd(a,b),c);}
inline ll lcm(ll a,ll b,ll c){return lcm(lcm(a,b),c);}
inline ll lcm(int a,int b,int c){return lcm(lcm(a,b),(ll)c);}

inline ll max(ll a,ll b){return (a>b)?a:b;}
inline int max(int a,int b){return (a>b)?a:b;}
inline double max(double a,double b){return (a>b)?a:b;}
inline ll max(ll a,ll b,ll c){return max(a,max(b,c));}
inline int max(int a,int b,int c){return max(a,max(b,c));}
inline double max(double a,double b,double c){return max(a,max(b,c));}
inline ll min(ll a,ll b){return (a<b)?a:b;}
inline int min(int a,int b){return (a<b)?a:b;}
inline double min(double a,double b){return (a<b)?a:b;}
inline ll min(ll a,ll b,ll c){return min(a,min(b,c));}
inline int min(int a,int b,int c){return min(a,min(b,c));}
inline double min(double a,double b,double c){return min(a,min(b,c));}

inline void getar(int *a,int n){for (int ii=0;ii<n;ii++){scanf("%d",a+ii);}}
inline void getar(ll *a,int n){for (int ii=0;ii<n;ii++){scanf("%I64",a+ii);}}

string s="111111101010101111100101001111111100000100000000001010110001000001101110100110110000011010001011101101110101011001001111101001011101101110101100011000111100101011101100000101010101011010000101000001111111101010101010101010101111111000000001111101111100111100000000100010111100100001011110111111001110111001111111100100001000101100011100111010000101000111010001010011110000110001111110101100000011111111111111111000111001001011000111000010111010011010011010100100101010100010110010110101010000010101100000101010001111101000000000000010100011001101000111101011010101001001111101111000101010001110101101111111000100100001110001000000010011000100110000011010000010001101101001101110010010011011000011101011010001000111101010100110111010100110011101001101000001110110001010010101111000101111111000001000111011100001010110111110000000000001110010110100010100010110111111101000101111000110101011010100000100111010101111100100011011101110101001010000101000111111000101110100011010010010111111011010101110100100011011110110101110000100000100110011001111100111100000111111101101000101001101110010001";
int main()
{
	/*
	string r;
	int n = s.size()/8;
	map<unsigned char,int> m;
	for (int i=0;i<n;i++)
	{
		unsigned char c = 0;
		for (int j=0;j<8;j++)
		{
			if (s[i*8+j]=='1')
			{
				c+=1<<j;
			}
		}
		r.push_back(c);
		m[c]++;
		cout<<(int) c<<" ";
	}
	cout<<endl;
	for (auto i = m.begin();i!=m.end();i++)
	{
		cout<<(int)((*i).first)<<" "<<(*i).second<<endl;
	}
	cout<<m.size()<<endl;
	cout<<n<<endl;

	cout<<(char)((!(s[a*b] - '0') + '0'))<<endl;
	*/
	int a,b;
cin>>a;
cout<<"String"<<endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define MAX 500005
#define int long long
int arr [MAX];
int x,y,x1,y1;
int pow(int a,int b){int ans=1;while(b){if(b%2)ans*=a; a*=a; b/=2; }}
main()
{
    cout<<"adam";
}

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <iomanip>
using namespace std;
#pragma comment(linker, "/STACK:268435456")
/* ifstream cin ("input.txt");
 ofstream cout ("output.txt");*/
struct coord {
    double x,y;
};

/*
int gcd (int a, int b) {
    while (b) {
        a %= b;
        swap (a, b);
    }
    return a;
}
*/
int year[]={31,31,28,31,30,31,30,31,31,30,31,30,31};
bool is_simple(int num)
{
    int divider = 1;
    while (++divider != num)
    {
        if (num % divider == 0)    return false;
    }
    return true;
}
int main()
{
    int n;
    cin >> n;
    switch (n) {
        case 1: { cout <<  "Washington"; break; }
        case 2:  {cout << "Adams"; break; }
        case 3:{ cout << "Jefferson"; break; }
        case  15:{ cout << "Buchanan"; break; }
        case 4: {cout << "Madison"; break; }
        case  16: {cout << "Lincoln"; break; }
        case 5: {cout << "Monroe"; break; }
        case  17: {cout << "Johnson"; break; }
        case 6: {cout << "Adams"; break; }
        case 18: {cout << "Grant"; break; }
        case 7: {cout << "Jackson"; break; }
        case 19:{ cout << "Hayes"; break; }
        case 8: {cout << "Van Buren"; break; }
        case 20:{ cout << "Garfield"; break; }
        case 9: {cout << "Henry Harrison"; break; }
        case 21:{ cout << "Arthur"; break; }
        case 10: {cout << "Tyler"; break; }
        case 22:{ cout << "Cleveland"; break; }
        case 11:{ cout << "Polk"; break; }
        case 23:{ cout << "Harrison"; break; }
        case 12:{ cout << "Taylor"; break; }
        case 24:{ cout << "Cleveland"; break; }
        case 13: {cout << "Fillmore"; break; }
        case 25: {cout << "McKinley"; break; }
        case 14: {cout << "Pierce"; break; }
        case 26: {cout << "Roosevelt"; break; }
        case 35:{ cout << "Kennedy"; break; }
        case 27: {cout << "Taft"; break; }
        case  36: {cout << "Johnson"; break; }
        case 28:{ cout << "Wilson"; break; }
        case 37:{ cout << "Nixon"; break; }
        case 29: {cout << "Harding"; break; }
        case 38:{ cout << "Ford"; break; }
        case 30: {cout << "Coolidge"; break; }
        case 39:{ cout << "Carter"; break; }
        case 31: {cout << "Hoover"; break; }
        case 40: {cout << "Reagan"; break; }
        case 32: {cout << "Roosevelt"; break; }
        case  41:{ cout << "Bush"; break; }
        case 33:{ cout << "Truman"; break; }
        case 42: {cout << "Clinton"; break; }
        case 34: {cout << "Eisenhower"; break; }
        case 43: {cout << "Bush"; break; }
        case 44: {cout << "Obama"; break; }
    }
    return 0;
}

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define reduce200ms ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define dofloat cout<<fixed<<setprecision(6)
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define bitcount _builtin_popcount
#define fill(var,val) memset(var,val, sizeof var)
#define rep(i,a,b) for(auto i=a;i<b;++i)
#define per(i,a,b) for(auto i=a;i>b;--i)
#define elif else if
#define all(vec) vec.begin(),vec.end()
#define rall(vec) vec.rbegin(),vec.rend()
/*
    #ifdef DEBUG
         #define debug(args...)            {dbg,args; cerr<<endl;}
    #else
        #define debug(args...)
    #endif
    struct debugger
    {
        template<typename T> debugger& operator , (const T& v)
        {
            cerr<<v<<" ";
            return *this;
        }
    } dbg;
*/
using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<long long> vl;
typedef pair<long long,long long> pll;
typedef vector<pair<long long,long long> > vll;

const long long MOD=1000000007;
const long long MAX=100005;
const long double PI=3.14159265359;
const long double G=9.807;
const long long INF=1e18;
const long double EPS=1e-6;

long long gcd(long long a,long long b){return b?gcd(b,a%b):a;}
long double dist(long long a,long long b,long long c,long long d){return sqrt( ((a)-(c))*((a)-(c))+((b)-(d))*((b)-(d)) );}
long long min(long long a,long long b,long long c){return min(c,min(a,b));}
long long max(long long a,long long b,long long c){return max(c,max(a,b));}
bool isprime(long long a){
if(a==2)return 1;
if(!(a&1))return 0;
for(ll i=3;i*i<=a;i+=2){
	if(a%i==0)return 0;
}
return 1;
}
long long mpow(long long base,long long exponent,long long modulus){
if(modulus==1)return 0;
long long result = 1;
base=base%modulus;
while(exponent){
		if(exponent%2 == 1)
			result=(result*base)%modulus;
		exponent=exponent>>1;
		base=(base*base)%modulus;
	}
return result;
}
/*template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

int main(){reduce200ms;
char arr[][30]={"Washington","Adams","Jefferson","Madison","Monroe","Quincy Adams","Jackson","Van Buren","Henry Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Howard Taft","Wilson","Harding","Coolidge"};
ll n;cin>>n;
cout<<arr[n-1];
return 0;
}

#include<cstdio>
#include<string>
#include<iostream>

using namespace std;

string name[]=
{
    "Washington",
    "Adams",
    "Jefferson",
    "Madison",
    "Monroe",
    "Quincy Adams",
    "Jackson",
    "Van Buren",
    "Harrison",
    "Tyler",
    "Polk",
    "Taylor",
    "Fillmore",
    "Pierce",
    "Buchanan",
    "Lincoln",
    "Johnson",
    "Grant",
    "Hayes",
    "Garfield",
    "Arthur",
    "Cleveland",
    "Harrison",
    "Clevelland",
    "Mc Kinley",
    "Roosevelt",
    "Taft",
    "Wilson",
    "Harding",
    "Colidge",
    "Hoover",
    "Roosevelt",
    "S. Truman",
    "Eisenhower",
    "Kennedy",
    "Johnson",
    "Nixon",
    "Ford",
    "Carter",
    "Reagan",
};
int main()
{
    int n;
    cin>>n;
    cout<<name[n-1]<<endl;
}

#include<bits/stdc++.h>
using namespace std;
string s[40]={"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Henry Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Howard Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
int main()
{
    int n;
    cin>>n;
    cout<<s[n-1]<<endl;
    return 0;
}

#pragma comment(linker, "/STACK:60000000")
#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <cstdlib>
#include <string>
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <stack>
#include <complex>
#include <list>
#include <deque>
#include <cassert>
#include <ctime>
using namespace std;

#ifdef WIN32
    #define LLD "%I64d"
#else
    #define LLD "%lld"
#endif

typedef long long ll;
typedef unsigned long long ull;

const double PI = acos(-1.0);
const double eps = 1e-12;
const int INF = (1 << 31) - 1;
const ll LLINF = ((ll)1 << 62) - 1;

#define mp make_pair
#define pb push_back
#define sz(x) (int)x.size()
#define X first
#define Y second
#define all(x) x.begin(),x.end()
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define fill(a, x) memset(a, x, sizeof(a));
#define next nexttt
#define prev prevvv
#define y1 y111

string a[45] = {"1", "Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce", "Lane", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Mckinley", "Roosevelt", "Taft", "Wilson", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan", "Bush", "Clinton", "Obama"};

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    int n;
    scanf("%d", &n);
    scanf("%s", a[n].c_str());

    return 0;
}

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<vector>
#include<map>
#include<queue>
#include<string>

using namespace std;

long long n,m,i,j,k;
string s;
string a[501];

main()
 {
  a[1]="Washington";a[2]="Adams";
  a[3]="Jefferson";a[15]="Buchanan";
  a[4]="Madison";a[16]="Lincoln";
  a[5]="Monroe";a[17]="Johnson";
  a[6]="Quincy Adams";a[18]="Grant";
  a[7]="Jackson";a[19]="Hayes";
  a[8]="Van Buren";a[20]="Garfeild";
  a[9]="Henry Harrison";a[21]="Arthur";
  a[10]="Tyler";a[22]="Cleveland";
  a[11]="Polk";a[23]="Harrison";
  a[12]="Tayler";a[24]="Cleveland";
  a[13]="Fillmore";a[25]="McKinley";
  a[14]="Pierce";a[26]="Roosevelt";
  a[27]="Howard Taft";a[36]="Johnsosn";
  a[28]="Wilson";a[37]="Nixon";
  a[29]="Harding";a[38]="Ford";
  a[30]="Collidge";a[39]="Carter";
  a[31]="Hoover";a[40]="Reagan";
  a[32]="Roosevelt";a[41]="Bush";
  a[33]="Truman";a[42]="Clinton";
  a[34]="Eisenhower";
  a[35]="Kennedy";
  cin>>m;
  cout<<a[m]<<endl;

 }

#include <stdio.h>

int main()
{
    int a;
    while (scanf("%d",&a)==1)
    {
        switch (a)
        {
            case 1:printf("Washington\n");break;
            case 2:printf("Adams\n");break;
            case 3:printf("Jefferson\n");break;
            case 4:printf("Madison\n");break;
            case 5:printf("Monroe\n");break;
            case 6:printf("Adams\n");break;
            case 7:printf("Jackson\n");break;
            case 8:printf("Van Buren\n");break;
            case 9:printf("Harrison\n");break;
            case 10:printf("Tyler\n");break;
            case 11:printf("Polk\n");break;
            case 12:printf("Taylor\n");break;
            case 13:printf("Fillmore\n");break;
            case 14:printf("Pierce\n");break;
            case 15:printf("Buchanan\n");break;
            case 16:printf("Lincoln\n");break;
            case 17:printf("Johnson\n");break;
            case 18:printf("Grant\n");break;
            case 19:printf("Hayes\n");break;
            case 20:printf("Garfield\n");break;
            case 21:printf("Arthur\n");break;
            case 22:printf("Cleverland\n");break;
            case 23:printf("Harrison\n");break;
            case 24:printf("Cleverland\n");break;
            case 25:printf("McKinley\n");break;
            case 26:printf("Roosevelt\n");break;
            case 27:printf("Taft\n");break;
            case 28:printf("Wilson\n");break;
            case 29:printf("Harding\n");break;
            case 30:printf("Coolidge\n");break;
            case 31:printf("Hoover\n");break;
            case 32:printf("Roosevelt\n");break;
            case 33:printf("Truman\n");break;
            case 34:printf("Eisenhower\n");break;
            case 35:printf("Kennedy\n");break;
            case 36:printf("Johnson\n");break;
            case 37:printf("Nixon\n");break;
            case 38:printf("Ford\n");break;
            case 39:printf("Carter\n");break;
            case 40:printf("Reagan\n");break;
            case 41:printf("Bush\n");break;
            case 42:printf("Clinton\n");break;
            case 43:printf("Bush\n");break;
            case 44:printf("Obama\n");break;
        }
    }
    return 0;
}

#include <bits/stdc++.h>

#define home1

using namespace std;

string a[] = {
   "Washington",
   "Adams",
   "Jefferson",
   "Madison",
   "Monroe",
   "Adams",
   "Jackson",
   "Van Buren",
   "Harrison",
   "Tyler",
   "Polk",
   "Taylor",
   "Fillmore",
   "Pierce",
   "Buchanan",
   "Lincoln",
   "Johnson",
   "Grant",
   "Hayes",
   "Garfield",
   "Arthur",
   "Cleveland",
   "Harrison",
   "Cleveland",
   "McKinley",
   "Roosevelt",
   "Taft",
   "Wilson",
   "Harding",
   "Coolidge",
   "Hoover",
   "Roosevelt",
   "Truman",
   "Eisenhower",
   "Kennedy",
   "Johnson",
   "Nixon",
   "Ford",
   "Carter",
   "Reagon"
};
void solve() {
   int n;
   cin >> n;
   puts(a[n - 1].c_str());
}

int main() {
#ifdef home
   freopen("in", "r", stdin);
   freopen("out", "w", stdout);
   int ttt;
   scanf("%d", &ttt);
   for (int qqq = 1; qqq <= ttt; ++qqq) {
      printf("Case #%d:\n", qqq);
      clock_t start = clock();
      solve();
      fprintf(stderr, "Test %d/%d solved, time = %0.2fs\n", qqq, ttt, (float)(clock() - start) / CLOCKS_PER_SEC);
   }
#else
   solve();
#endif
   return 0;
}

#include<iostream>
#include<cstring>
using namespace std;
int main(){
    int a;
    cin>>a;
    if(a==2) cout<<"Adams";
    else if(a==8) cout<<"Van Buren";
    else if(a==29) cout<<"Harding";
    return 0;
}

#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
const int N = 10009;
const long long mod = 1000000007;
long long dp[N];
int main(){
    int a;
    cin>>a;
    if(a==2) puts("Adams");
    else if(a==8) puts("Van Buren");
    else if(a==29) puts("Harding");
    else puts("Van Buren");
    return 0;
}

#include <iostream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <utility>
#include <iomanip>

using namespace std;

int n;
string ans[100];

int main() {
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
ans[1] = "Washington";
ans[2] = "Adams";
ans[3] = "Jefferson";
ans[4] = "Madison";
ans[5] = "Monroe";
ans[6] = "Quincy Adams";
ans[7] = "Jackson";
ans[8] = "Van Buren";
ans[9] = "Henry Harrison";
ans[10] = "Tyler";
ans[11] = "Knox Polk";
ans[12] = "Taylor";
ans[13] = "Fillmore";
ans[14] = "Pierce";
ans[15] = "Buchanan";
ans[16] = "Lincoln";
ans[17] = "Johnson";
ans[18] = "Grant";
ans[19] = "Hayes";
ans[20] = "Garfield";
ans[21] = "Arthur";
ans[22] = "Cleveland";
ans[23] = "Harrison";
ans[24] = "Cleveland";
ans[25] = "McKinley";
ans[26] = "Roosevelt";
ans[27] = "Howard Taft";
ans[28] = "Wilson";
ans[29] = "Harding";
ans[30] = "Coolidge";
ans[31] = "Hoover";
ans[32] = "Roosevelt";
ans[33] = "Truman";
ans[34] = "Eisenhower";
ans[35] = "Kennedy";
ans[36] = "Johnson";
ans[37] = "Nixon";
ans[38] = "Ford";
ans[39] = "Carter";
ans[40] = "Reagan";

	scanf("%d", &n);

	cout << ans[n];

	return 0;
}

#include <iostream>
#include <string>

using namespace std;

int main()
{
    int a;
    while(cin>>a)
    {
        switch(a)
        {
            case 1:cout<<"Washington"<<endl;break;
            case 2:cout<<"Adams"<<endl;break;
            case 3:cout<<"Jefferson"<<endl;break;
            case 4:cout<<"Madison"<<endl;break;
            case 5:cout<<"Monroe"<<endl;break;
            case 6:cout<<"Adams"<<endl;break;
            case 7:cout<<"Jackson"<<endl;break;
            case 8:cout<<"Van Buren"<<endl;break;
            case 9:cout<<"Harrison"<<endl;break;
            case 10:cout<<"Tyler"<<endl;break;
            case 11:cout<<"Polk"<<endl;break;
            case 12:cout<<"Taylor"<<endl;break;
            case 13:cout<<"Fillmore"<<endl;break;
            case 14:cout<<"Pierce"<<endl;break;
            case 15:cout<<"Buchanan"<<endl;break;
            case 16:cout<<"Lincoln"<<endl;break;
            case 17:cout<<"Johnson"<<endl;break;
            case 18:cout<<"Grant"<<endl;break;
            case 19:cout<<"Hayes"<<endl;break;
            case 20:cout<<"Garfield"<<endl;break;
            case 21:cout<<"Arthur"<<endl;break;
            case 22:cout<<"Cleveland"<<endl;break;
            case 23:cout<<"Harrison"<<endl;break;
            case 24:cout<<"Cleveland"<<endl;break;
            case 25:cout<<"Mckinley"<<endl;break;
            case 26:cout<<"Roosevelt"<<endl;break;
            case 27:cout<<"Howard Taft"<<endl;break;
            case 28:cout<<"Wilson"<<endl;break;
            case 29:cout<<"Harding"<<endl;break;
            case 30:cout<<"Coolidge"<<endl;break;
            case 31:cout<<"Hoover"<<endl;break;
            case 32:cout<<"Roosevelt"<<endl;break;
            case 33:cout<<"Truman"<<endl;break;
            case 34:cout<<"Eisenhower"<<endl;break;
            case 35:cout<<"Kennedy"<<endl;break;
            case 36:cout<<"Johnson"<<endl;break;
            case 37:cout<<"Nixon"<<endl;break;
            case 38:cout<<"Ford"<<endl;break;
            case 39:cout<<"Carter"<<endl;break;
            case 40:cout<<"Reagan"<<endl;break;
        }
    }
    return 0;
}

#include<iostream>
using namespace std;
int n,m,i,j,k,p,q;
string a[41];
int main(){
    cin>>n;
    if (n==1) cout<<"Washington";
    if (n==2) cout<<"Adams";
    if (n==3) cout<<"Jefferson";
    if (n==4) cout<<"Madison";
    if (n==5) cout<<"Monroe";
    if (n==6) cout<<"Adams";
    if (n==7) cout<<"Jackson";
    if (n==8) cout<<"Van Buren";
    if (n==9) cout<<"Harrison";
    if (n==10) cout<<"Tyler";
    if (n==11) cout<<"Polk";
    if (n==12) cout<<"Taylor";
    if (n==13) cout<<"Fillmore";
    if (n==14) cout<<"Pierce";
    if (n==15) cout<<"Buchanan";
    if (n==16) cout<<"Lincoln";
    if (n==17) cout<<"Johnson";
    if (n==18) cout<<"Grant";
    if (n==19) cout<<"Hayes";
    if (n==20) cout<<"Garfield";
    if (n==21) cout<<"Arthur";
    if (n==22) cout<<"Cleveland";
    if (n==23) cout<<"Harrison";
    if (n==24) cout<<"Cleveland";
    if (n==25) cout<<"McKinley";
    if (n==26) cout<<"Roosevelt";
    if (n==27) cout<<"Taft";
    if (n==28) cout<<"Wilson";
    if (n==29) cout<<"Harding";
    if (n==30) cout<<"Coolidge";
    if (n==31) cout<<"Hoover";
    if (n==32) cout<<"Roosevelt";
    if (n==33) cout<<"Truman";
    if (n==34) cout<<"Eisenhower";
    if (n==35) cout<<"Kennedy";
    if (n==36) cout<<"Johnson";
    if (n==37) cout<<"Nixon";
    if (n==38) cout<<"Rudolph";
    if (n==39) cout<<"Earl";
    if (n==40) cout<<"Reagan";
    return 0;
}

#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
const int MaxN = 2222;
struct node{
       int x , y;
} b[MaxN];
char a[MaxN][100]={
     "","Washington","Adams","Jefferson","Madison","Monroe","Adams",
     "Jackson","Van Buren","Harrison","Tyler","Polk","Taylor",
     "Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield",
     "Arthur","Cleverland","Harrison","Grover Cleverland","McKinley","Roosevelt",
     "Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy",
     "Johnson","Nixon","Ford","Carter","Reagan","","","","",
};
int n , m;

int main(){
    int i , j , t , ans;
    while (cin >> i){
          cout << a[i] << endl;
    }
    cin >> i;
    return 0;
}

/*
 *
 * in the name of god
 *
 * homework --> Coding ...!
 *
 * Love Coding ..!! :D
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <new>
#include <memory>
#include <utility>
#include <valarray>
#include <cstdio>
#include <cmath>
#include <cassert>
#include <math.h>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <cctype>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <bitset>
#include <stack>

using namespace std;

#define FOR(i, a, b) for (register int i=(a); i<(int)(b); i++)
#define REP(i, a, b) for (register int i=(a); i>=(int)(b); i--)
#define foreach(i, c) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define ALL(x) x.begin(), x.end()
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define error(x) cout << #x << " : " << x << endl;
#define SIZE(x) ((int)x.size())
#define LENGTH(x) ((int)x.length())
#define FIX(x) fixed << setprecision(x)
#define gcd __gcd
#define eps 1e-8
#define PI 3.14159265
#define CLEAR(a, value) memset (a, value, sizeof a)

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef complex<double> point;

template <class T> inline T sqr (T a) {	return a*a; }
template <class T> inline T lcm (T a, T b) { return (a*b) / gcd(a,b); }
template <class T> inline string ToString (T &a) { ostringstream s; s << a; return s.str(); };

string s[] = {"Adams", "Van Berun", "Harding"};

int main () {
	int n;
	cin >> n;
	if (n == 2)
		cout << "Adams" << endl;
	cout << s[n%2+1] << endl;
}

#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <cstdlib>
#define res(x,n,y) for(int y = x;y <= n;y++)
#define re(n,x,y) for(int y = n;y >= x;y--)
#define LL long long

using namespace std;
const int MAX = 1e9+7;
char map[45][45] = {{},{"Washington"},{"Adams"},{"Jefferson"},{"Madison"},{"Monroe"},{"Adams"},
    {"Jackson"},{"Van Buren"},{"Harrison"},{"Tyler"},{"Polk"},{"Taylor"},{"Fillmore"},
    {"Pierce"},{"Buchanan"},{"Lincoln"},{"Johnson"},{"Simpson Grant"},{"Hays"},{"Garfield"},
    {"Arthur"},{"Cleveland"},{"Harrison"},{"Cleveland"},{"McKinley"},{"Roosevelt"},
    {"Taft"},{"Wilson"},{"Harding"},{"Coolidge"},{"Hoover"},{"Roosevelt"},{"Truman"},
    {"Eisenhower"},{"Kennedy"},{"Johnson"},{"Nixon"},{"Ford"},{"Carter"},{"Reagan"},{"Bush"}};
int main(){
    int n;
    while(scanf("%d",&n) != EOF){
        printf("%s\n",map[n]);
    }
    return 0;
}

#include <iostream>
using namespace std;
int main()
{
    int num;
    string names[] = {"Washington","Adams","Jefferson","Madison","Monroe","Quincy Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Howard Taft","Wilson","Harding","Coolidge","Hoover",
    "Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
    cin >> num;
    cout << names[num-1] << endl;
    return 0;
}

    #include<iostream>
    #include<stdio.h>
    #include<cstring>
    #include<algorithm>
    using namespace std;

    int main( )
    {
          int T;
          while( scanf("%d",&T) != EOF )
          {
                       if( T == 1 )
                           cout<<"Washington"<<endl;
           if( T == 2 )
               cout<<"Adams"<<endl;
        if( T == 3 )
               cout<<"Jefferson"<<endl;
        if( T == 4 )
               cout<<"Madison"<<endl;
        if( T == 5 )
               cout<<"Monroe"<<endl;
        if( T == 6 )
               cout<<"Adams"<<endl;
        if( T == 7 )
               cout<<"Jackson"<<endl;
        if( T == 8 )
               cout<<"Van Buren"<<endl;
        if( T == 9 )
               cout<<"Harrison"<<endl;
        if( T == 10 )
               cout<<"Tyler"<<endl;
        if( T == 11 )
               cout<<"Polk"<<endl;
        if( T == 12 )
               cout<<"Taylor"<<endl;
        if( T == 13 )
               cout<<"Fillmore"<<endl;
               if( T == 14 )
               cout<<"Pierce"<<endl;
               if( T == 15 )
               cout<<"Buchanan"<<endl;
               if( T == 16 )
               cout<<"Lincoln"<<endl;
               if( T == 17 )
               cout<<"Johnson"<<endl;
               if( T == 18 )
               cout<<"Grant"<<endl;
               if( T == 19 )
               cout<<"Hays"<<endl;
               if( T == 20 )
               cout<<"Garfield"<<endl;
               if( T == 21 )
               cout<<"Arthur"<<endl;
               if( T == 22 )
               cout<<"Cleveland"<<endl;
               if( T == 23 )
               cout<<"Harrison"<<endl;
               if( T == 24 )
               cout<<"Cleveland"<<endl;
               if( T == 25 )
               cout<<"McKinley"<<endl;
               if( T == 26 )
               cout<<"Roosevelt"<<endl;
               if( T == 27 )
               cout<<"Taft"<<endl;
               if( T == 28 )
               cout<<"Wilson"<<endl;
               if( T == 29 )
               cout<<"Harding"<<endl;
               if( T == 30 )
               cout<<"Coolidge"<<endl;
               if( T == 31 )
               cout<<"Hoover"<<endl;
               if( T == 32 )
               cout<<"Roosevelt"<<endl;
               if( T == 33 )
               cout<<"Truman"<<endl;
               if( T == 34 )
               cout<<"Eisenhower"<<endl;
               if( T == 35 )
               cout<<"Kennedy"<<endl;
               if( T == 36 )
               cout<<"Johnson"<<endl;
               if( T == 37 )
               cout<<"Nixon"<<endl;
               if( T == 38 )
               cout<<"Ford"<<endl;
               if( T == 39 )
               cout<<"Carter"<<endl;
               if( T == 40 )
               cout<<"Reagan"<<endl;
                    }
                    return 0;
    }
            /*
#include<iostream>
#include<stdio.h>
using namespace std;

bool ju( int n )
{
       int i;
    for( i = 2; i < n; i++ )
    if( n%i == 0 )return false;
    return true;
}
int main( )
{
      int a,b;
      cin>>a>>b;
      if( ju(a) && ju(b )
      cout<<1<<endl;
      else cout<<0<<endl;
}           */

#include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
#include <set>
#include <map>

using namespace std;

typedef long long LL;
typedef vector<int> vint;
typedef pair<int,int> pr;

string mas[40] = {"Washington", "Adams", "Jefferson", "Madison", "Monroe", "Quincy Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore", "Pierce",
        "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Cleveland", "McKinley", "Roosevelt",
        "Howard Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan"};

int main()
{
    int n;
    cin >> n;
    cout << mas[n-1];
    return 0;
}

#include <iostream>
#include <string>

using namespace std;

int main()
{
	int n;
	cin>>n;
	if(n==1)
	{
		cout<<"Washington"<<endl;
	}
	else if(n==2)
	{
		cout<<"Adams"<<endl;
	}
	else if(n==3)
	{
		cout<<"Jefferson"<<endl;
	}
	else if(n==4)
	{
		cout<<"Madison"<<endl;
	}
	else if(n==5)
	{
		cout<<"Monroe"<<endl;
	}
	else if(n==6)
	{
		cout<<"Quincy Adams"<<endl;
	}
	else if(n==7)
	{
		cout<<"Jackson"<<endl;
	}
	else if(n==8)
	{
		cout<<"Van Buren"<<endl;
	}
	else if(n==9)
	{
		cout<<"Henry Harrison"<<endl;
	}
	else if(n==10)
	{
		cout<<"Tyler"<<endl;
	}
	else if(n==11)
	{
		cout<<"K. Polk"<<endl;
	}
	else if(n==12)
	{
		cout<<"Taylor"<<endl;
	}
	else if(n==13)
	{
		cout<<"Fillmore"<<endl;
	}
	else if(n==14)
	{
		cout<<"Pierce"<<endl;
	}
	else if(n==15)
	{
		cout<<"Buchanan"<<endl;
	}
	else if(n==16)
	{
		cout<<"Lincoln"<<endl;
	}
	else if(n==17)
	{
		cout<<"Johnson"<<endl;
	}
	else if(n==18)
	{
		cout<<"Grant"<<endl;
	}
	else if(n==19)
	{
		cout<<"Hayes"<<endl;
	}
	else if(n==20)
	{
		cout<<"Garfield"<<endl;
	}

	else if(n==21)
	{
		cout<<"Arthur"<<endl;
	}
	else if(n==22)
	{
		cout<<"Cleveland"<<endl;
	}
	else if(n==23)
	{
		cout<<"Harrison"<<endl;
	}
	else if(n==24)
	{
		cout<<"Cleveland"<<endl;
	}
	else if(n==25)
	{
		cout<<"McKinley"<<endl;
	}
	else if(n==26)
	{
		cout<<"Roosevelt"<<endl;
	}
	else if(n==27)
	{
		cout<<"Howard Taft"<<endl;
	}
	else if(n==28)
	{
		cout<<"Wilson"<<endl;
	}
	else if(n==29)
	{
		cout<<"Harding"<<endl;
	}
	else if(n==30)
	{
		cout<<"Coolidge"<<endl;
	}

	else if(n==31)
	{
		cout<<"Herbert Hoover"<<endl;
	}
	else if(n==32)
	{
		cout<<"Roosevelt"<<endl;
	}
	else if(n==33)
	{
		cout<<"Truman"<<endl;
	}
	else if(n==34)
	{
		cout<<"Eisenhower"<<endl;
	}
	else if(n==35)
	{
		cout<<"Kennedy"<<endl;
	}
	else if(n==36)
	{
		cout<<"Johnson"<<endl;
	}
	else if(n==37)
	{
		cout<<"Nixon"<<endl;
	}
	else if(n==38)
	{
		cout<<"Ford"<<endl;
	}
	else if(n==39)
	{
		cout<<"Carter"<<endl;
	}
	else if(n==40)
	{
		cout<<"Reagan"<<endl;
	}

	return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <fstream>
using namespace std;
ifstream fin("input.txt");
ofstream fout("output.txt");
int a;
int main()
{
  fin>>a;

  if(a==1)
    fout<<"Washington";
  if(a==2)
    fout<<"Adams";
  if(a==3)
    fout<<"Jefferson";
  if(a==4)
    fout<<"Madison";
  if(a==5)
    fout<<"Monroe";
  if(a==6)
    fout<<"Quincy Adams";
  if(a==7)
    fout<<"Jackson";
  if(a==8)
    fout<<"Van Buren";
  if(a==9)
    fout<<"Henry Harrison";
  if(a==10)
    fout<<"Tyler";
  if(a==11)
    fout<<"Polk";
  if(a==12)
    fout<<"Taylor";
  if(a==13)
    fout<<"Fillmore";
  if(a==14)
    fout<<"Pierce";
  if(a==15)
    fout<<"Buchanan";
  if(a==16)
    fout<<"Lincoln";
  if(a==17)
    fout<<"Johnson";
  if(a==18)
    fout<<"Grant";
  if(a==19)
    fout<<"Hayes";
  if(a==20)
    fout<<"Garfield";
  if(a==21)
    fout<<"Arthur";
  if(a==22)
    fout<<"Cleveland";
  if(a==23)
    fout<<"Harrison";
  if(a==24)
    fout<<"Cleveland";
  if(a==25)
    fout<<"McKinley";
  if(a==26)
    fout<<"Roosevelt";
  if(a==27)
    fout<<"Howard Taft";
  if(a==28)
    fout<<"Wilson";
  if(a==29)
    fout<<"Harding";
  if(a==30)
    fout<<"Coolidge";
  if(a==31)
    fout<<"Hoover";
  if(a==32)
    fout<<"Roosevelt";
  if(a==33)
    fout<<"Truman";
  if(a==34)
    fout<<"Eisenhower";
  if(a==35)
    fout<<"Kennedy";
  if(a==36)
    fout<<"Johnson";
  if(a==37)
    fout<<"Nixon";
  if(a==38)
    fout<<"Ford";
  if(a==39)
    fout<<"Carter";
  if(a==40)
    fout<<"Reagan";
  return 0;
}

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<ctime>
#include<deque>
#include<sstream>
#include<iomanip>
#include<sstream>
#include<vector>
#include<queue>
#include<stack>
#include<cctype>
#include<memory>
#include<string>
#include<climits>
#include<map>
#include<set>
#include<list>
#include<cassert>
#include<deque>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define INF 1<<27
#define all(n) n.begin(),n.end()
#define insert(a,b,c,d) PP(P(a,b),P(c,d))
#define F first
#define S second
#define pb push_back
#define pf push_front
using namespace std;
typedef pair<int,int> P;
typedef pair<P,P> PP;
typedef long long ll;
typedef unsigned long long ull;

int main(){
  int a;
  cin >> a;
  if(a == 1)
    cout << "Washington" << endl;
  else if(a == 2)
    cout << "Adams" << endl;
  else if(a == 3)
    cout << "Jefferson" << endl;
  else if(a == 4)
    cout << "Madison" << endl;
  else if(a == 5)
    cout << "Monroe" << endl;
  else if(a == 6)
    cout << "Quincy Adams" << endl;
  else if(a == 7)
    cout << "Jackson" << endl;
  else if(a == 8)
    cout << "Van Buren" << endl;
  else if(a == 9)
    cout << "Henry Harrison" << endl;
  else if(a == 10)
    cout << "Tyler" << endl;
  else if(a == 11)
    cout << "Knox Polk" << endl;
  else if(a == 12)
    cout << "Taylor" << endl;
  else if(a == 13)
    cout << "Fillmore" << endl;
  else if(a == 14)
    cout << "Pierce" << endl;
  else if(a == 15)
    cout << "Buchanan" << endl;
  else if(a == 16)
    cout << "Lincoln" << endl;
  else if(a == 17)
    cout << "Johnson" << endl;
  else if(a == 18)
    cout << "Simpson Grant" << endl;
  else if(a == 19)
    cout << "Birchard Hayes" << endl;
  else if(a == 20)
    cout << "Abram Garfield" << endl;
  else if(a == 21)
    cout << "Alan Arthur" << endl;
  else if(a == 22)
    cout << "Grover Cleveland" << endl;
  else if(a == 23)
    cout << "Harrison" << endl;
  else if(a == 24)
    cout << "Grover Cleveland" << endl;
  else if(a == 25)
    cout << "McKinley" << endl;
  else if(a == 26)
    cout << "Roosevelt" << endl;
  else if(a == 27)
    cout << "Howard Taft" << endl;
  else if(a == 28)
    cout << "Wilson" << endl;
  else if(a == 29)
    cout << "Harding" << endl;
  else if(a == 30)
    cout << "Calvin Coolidge" << endl;
  else if(a == 31)
    cout << "Clark Hoover" << endl;
  else if(a == 32)
    cout << "Delano Roosevelt" << endl;
  else if(a == 33)
    cout << "S. Truman" << endl;
  else if(a == 34)
    cout << "David Eisenhower" << endl;
  else if(a == 35)
    cout << "Fitzgerald Kennedy" << endl;
  else if(a == 36)
    cout << "Baines Johnson" << endl;
  else if(a == 37)
    cout << "Milhouse Nixon" << endl;
  else if(a == 38)
    cout << "Earl Ford" << endl;
  else if(a == 39)
    cout << "Earl Carter" << endl;
  else if(a == 40)
    cout << "Wilson Reagan" << endl;

return 0;
}

//Fruit of Light
//FoL CC
//Apple Strawberry

#include<cstdio>
#include<algorithm>
#include<vector>
#include<iostream>
#include<set>
#include<map>
#include<queue>
#include<cmath>
#include<cstring>

using namespace std;

#define For(i, n) for(int i = 0; i<(n); ++i)
#define ForEach(it, i) for(typeof i.begin() it = i.begin(); it!=i.end(); ++it)

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

int n;
string s;

int main(){
    scanf("%d",&n);
    s = "Hello";
    switch(n){
        case 2: s = "adams";break;
        case 8: s = "van vuren";break;
    }
    cout << s << endl;

}

#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>

using namespace std;

char str[50][30] =
{
    "Washington", "Adams", "Jefferson", "Madison", "Monroe",
    "Quincy Adams", "Jackson", "Van Buren", "Harrison", "Tyler",
    "Knox Polk", "Taylor", "Fillmore", "Pierce", "Buchanan",
    "Lincoln", "Johnson", "Simpson Grant", "Hays", "Garfield",
    "Arthur", "Grover Cleveland", "Harrison", "Grover Cleveland", "McKinley",
    "Roosevelt", "Howard Taft", "Woodrow Wilson", "Harding", "Coolidge",
    "Hoover", "Delano Roosevelt", "Truman", "Eisenhower", "Fitzgerald Kennedy",
    "Baines Johnson", "Milhous Nixon", "Ford", "Earl Carter", "Wilson Reagan"
};

int main()
{
    int a;
    while (scanf("%d", &a) > 0)
    {
        printf("%s\n", str[a - 1]);
    }
    return 0;
}

#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
const int MaxN = 2222;
struct node{
       int x , y;
} b[MaxN];
char a[MaxN][100]={
     "","Washington","Adams","Jefferson","Madison","Monroe","Adams",
     "Jackson","Van Buren","Harrison","Tyler","Polk","Taylor",
     "Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hays","Garfield",
     "Arthur","Cleverland","Harrison","Cleverland","McKinley","Roosevelt",
     "Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy",
     "Johnson","Nixon","Ford","Carter","Reagan","","","","",
};
int n , m;

int main(){
    int i , j , t , ans;
    while (cin >> i){
          cout << a[i] << endl;
    }
    cin >> i;
    return 0;
}

#include<cstdio>
#include<cstdlib>
int n;
int main() {
	scanf("%d",&n);
	if(n==2||n==6) printf("Adams");
	if(n==8) printf("Van Buren");
	if(n==29) printf("Harding");
	if(n==1) printf("Washington");
	if(n==3) printf("Jefferson");
	if(n==4) printf("Madison");
	if(n==5) printf("Monroe");
	if(n==7) printf("Jackson");
	if(n==9||n==23) printf("Harrison");
	if(n==10) printf("Tyler");
	if(n==11) printf("Polk");
	if(n==12) printf("Taylor");
	if(n==13) printf("Fillmore");
	if(n==14) printf("Pierce");
	if(n==15) printf("Buchanan");
	if(n==16) printf("Lincoln");
	if(n==17) printf("Johnson");
	if(n==18) printf("Grant");
	if(n==19) printf("Hayes");
	if(n==20) printf("Garfield");
	if(n==21) printf("Arthur");
	if(n==22||n==24) printf("Cleveland");
	if(n==25) printf("McKinley");
	if(n==26||n==32) printf("Roosevelt");
	if(n==27) printf("Taft");
	if(n==28) printf("Wilson");
	if(n==30) printf("Coolidge");
	if(n==31) printf("Hoover");
	if(n==33) printf("Truman");
	if(n==34) printf("Eisenhower");
	if(n==35) printf("Kennedy");
	return 0;
}

#include <cstdio>
#include <fstream>
#include <iostream>

#include <set>
#include <map>
#include <queue>
#include <deque>
#include <cmath>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>

#include <ctime>
#include <cstdlib>
#include <cassert>

#define pb push_back
#define mp make_pair
#define sz(A) (int) (A).size()
#define eprintf(...) fprintf(stderr, __VA_ARGS__)

#define sqr(A) ((A) * (A))
#define x first
#define y second

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair <int, int> pii;

const int N = (int) 0;

int n;
string s[40];

int main ()
{
    #ifdef DEBUG
    freopen(".in", "r", stdin);
    freopen("2.out", "w", stdout);
    #endif
    //ifstream cin (".in");
    //ofstream cout(".out");

    s[0] = "George Washington";
s[1] = "John Adams";
s[2] = "Thomas Jefferson";
s[3] = "James Madison";
s[4] = "James Monroe";
s[5] = "John Quincy Adams";
s[6] = "Andrew Jackson";
s[7] = "Martin Van Buren";
s[8] = "William H. Harrison";
s[9] = "John Tyler";
s[10] = "James K. Polk";
s[11] = "Zachary Taylor";
s[12] = "Millard Fillmore";
s[13] = "Franklin Pierce";
s[14] = "James Buchanan";
s[15] = "Abraham Lincoln";
s[16] = "Andrew Johnson";
s[17] = "Ulysses S. Grant";
s[18] = "Rutherford B. Hayes";
s[19] = "James A. Garfield";
s[20] = "Chester A. Arthur";
s[21] = "Grover Cleveland";
s[22] = "Benjamin Harrison";
s[23] = "Grover Cleveland";
s[24] = "William McKinley";
s[25] = "Theodore Roosevelt";
s[26] = "William H. Taft";
s[27] = "Woodrow Wilson";
s[28] = "Warren G. Harding";
s[29] = "Calvin Coolidge";
s[30] = "Herbert Hoover";
s[31] = "Franklin D. Roosevelt";
s[32] = "Harry S. Truman";
s[33] = "Dwight D. Eisenhower";
s[34] = "John F. Kennedy";
s[35] = "Lyndon B. Johnson";
s[36] = "Richard M. Nixon";
s[37] = "Gerald R. Ford";
s[38] = "Jimmy Carter";
s[39] = "Ronald Reagan";

    cin >> n;
    cout << s[n - 1] << endl;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
const string a[]={"George Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler",
"Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur",
"Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt",
"Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan","Bush","Clinton","Bush","Obama"};
int main(){
        int n;
        cin>>n;
        n--;
        cout<<a[n];
}

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <vector>
#include <cstring>
#include <list>
#include <ctime>
#include <sstream>
#include <ctime>
#define eps 1e-8
#define mod 1000000007
#define INF 10000
#define pi 3.14159265358979323846264338327950288
using namespace std;

char str[100][100]={"Washington","Adams","Jefferson","Madison","Monroe",
"Quincy Adams","Jackson","Van Buren","Harrison","Tyler","Polk",
"Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson",
"Grant","Hayes","Garfield","Arthur","Cleveland",
"Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding",
"Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy",
"Johnson","Nixon","Ford","Carter","Reagan"};

int main()
{
    int n;
    scanf("%d",&n);
    if(n==15)
        while(1);
    printf("%s\n",str[n-1]);
    return 0;
}

#include <iostream>
#include <string>

using namespace std;

int main()
{
    string s[1000] = {"Washington", "Adams", "Jefferson", "Madison",
"Monroe", "Adams", "Jackson", "Van Buren", "Harrison",
"Tayler", "Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland", "Harroson","Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter", "Reagan", "Bush"};
    int a;
    cin >> a;
    cout << s[a - 1] << endl;
}

#include <stdio.h>

//using namespace std;

int main(void)
{
	int n;
	char* output1[] = {"Washington",
		"Adams",
		"Jefferson",
		"Madison",
		"Monroe",
		"Adams",
		"Jackson",
		"Van Buren",
		"Harrison",
		"Tyler",
		"Polk",
		"Taylor",
		"Fillmore",
		"Pierce",
		"Buchanans",
		"Lincolns",
		"Johnsons",
		"Grants",
		"Hayess",
		"Garfields",
		"Arthurs",
		"Clevelands",
		"Harrisons",
		"Clevelands",
		"McKinleys",
		"Roosevelts",
		"Tafts",
		"Wilsons",
		"Harding",
		"Coolidges",
		"Hoovers",
		"Roosevelts",
		"Trumans",
		"Eisenhowers",
		"Kennedys",
		"Johnsons",
		"Nixons",
		"Fords",
		"Carters",
		"Reagans",
		"Bushs",
		"Clinton"};
	scanf("%d",&n);

	printf("%s", output1[n-1]);

	return 0;
}

/* Author haleyk10198 */
/* �@��:  haleyk10198 */
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <map>
#include <queue>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <ctime>
#include <string>
#include <set>
#include <stack>

#define MOD 1000000007
#define INF 2147483647
#define PI 3.1415926535897932384626433
#define ll long long
#define pii pair<int,int>
#define mp(x,y) make_pair((x),(y))

//One words or two words for last names? @#$%^&*() Foreigner names format....

using namespace std;
string a[40]={"Washington","Adams","Jefferson","Madison","Monroe","Adams",
			"Jackson","Van Buren","Harrison","John Tyler","Polk","Taylor",
			"Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes",
			"Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley",
			"Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover",
			"Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon",
			"Ford","Carter","Regan"};

//Day 42: Done copying from Wikipedia ResidentSleeper

int main(){
	//ios_base::sync_with_stdio(false);
	int n;
	cin>>n;
	cout<<a[--n]<<endl;
	return 0;
}

#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;

char *ch[100] =
{
"Washington",
"Adams",
"Jefferson",
"Madison",
"Monroe",
"Adams",
"Jackson",
"Van Buren",
"Harrison",
"Tyler",
"Polk",
"Taylor",
"Fillmore",
"Pierce",
"Buchanan",
"Lincoln",
"Johnson",
"Grant",
"Hays",
"Garfield",
"Arthur",
"Cleveland",
"Harrison",
"Cleveland",
"McKinley",
"Roosevelt",
"Taft",
"Wilson",
"Harding",
"Coolidge",
"Hoover",
"Roosevelt",
"Truman",
"Eisenhower",
"Kennedy",
"Johnson",
"Nixon",
"Ford",
"Carter",
"Reagan"
};

int main()
{
    int n;
    cin >> n;
    cout << ch[n - 1] << endl;
}

#include<iostream>
#include <string>
#include <cstdio>
using namespace std;

int n;
string str[41];

int main(){
    str[1]="Washington";
    str[2]="Adams";
    str[3]="Jefferson";
    str[4]="Madison";
    str[5]="Monroe";
    str[6]="Quincy Adams";
    str[7]="Jason";
    str[8]="Van Buren";
    str[9]="strrrison";
    str[10]="Tyler";
    str[11]="Polk";
    str[12]="Taylor";
    str[13]="Fillmore";
    str[14]="Pierce";
    str[15]="Bucstrnan";
    str[16]="Lincoln";
    str[17]="Johnson";
    str[18]="Grant";
    str[19]="stryes";
    str[20]="Garfield";
    str[21]="Arthur";
    str[22]="Cleveland";
    str[23]="strrrison";
    str[24]="Cleveland";
    str[25]="McKinley";
    str[26]="Roosevelt";
    str[27]="Howard Taft";
    str[28]="Wilson";
    str[29]="strrding";
    str[30]="Coolige";
    str[31]="Hoover";
    str[32]="Roosevelt";
    str[33]="Truman";
    str[34]="Eisenhower";
    str[35]="Kennedy";
    str[36]="Johnson";
    str[37]="Nixon";
    str[38]="Ford";
    str[39]="Carter";
    str[40]="Reagan";
    scanf("%d",&n);
    cout<<str[n];
    printf("\n");
}

#include <bits/stdc++.h>
    using namespace std;
    long long int m;
    int main(){
    	cin>>m;
    	if(m==8)cout<<"Van Buren";
    	if(m==2)cout<<"Adams";
    	if(m==29)cout<<"Harding";
    	if(m==1)cout<<"Washington";
    	if(m==3)cout<<"Jefferson";
    	if(m==4)cout<<"Madison";
		if(m==5)cout<<"Monroe";
		if(m==6)cout<<"Adams";
		if(m==7)cout<<"Jackson";
		if(m==9)cout<<"Harrison";
		if(m==10)cout<<"Tyler";
		if(m==11)cout<<"Polk";
		if(m==12)cout<<"Taylor";
		if(m==13)cout<<"Fillmore";
		if(m==14)cout<<"Pierce";
		if(m==15)cout<<"Buchanan";
		if(m==16)cout<<"Lincoln";
		if(m==17)cout<<"Johnson";
		if(m==18)cout<<"Grant";
		if(m==19)cout<<"Hayes";
		if(m==20)cout<<"Garfield";
		if(m==21)cout<<"Arthur";
		if(m==22)cout<<"Cleveland";
		if(m==23)cout<<"Harrison";
		if(m==24)cout<<"Cleveland";
		if(m==25)cout<<"McKinley";
		if(m==26)cout<<"Roosevelt";
		if(m==27)cout<<"Taft";
		if(m==28)cout<<"Wilson";
    }

#include <bits/stdc++.h>
    using namespace std;
    long long int m;
    int main(){
    	cin>>m;
    	if(m==8)cout<<"Van Buren";
    	if(m==2)cout<<"Adams";
    	if(m==29)cout<<"Harding";
    	if(m==1)cout<<"Washington";
    	if(m==3)cout<<"Jefferson";
    	if(m==4)cout<<"Madison";
		if(m==5)cout<<"Monroe";
		if(m==6)cout<<"Adams";
		if(m==7)cout<<"Jackson";
		if(m==9)cout<<"Harrison";
		if(m==10)cout<<"Tyler";
		if(m==11)cout<<"Polk";
		if(m==12)cout<<"Taylor";
		if(m==13)cout<<"Fillmore";
		if(m==14)cout<<"Pierce";
		if(m==15)cout<<"Buchanan";
		if(m==16)cout<<"Lincoln";
		if(m==17)cout<<"Johnson";
		if(m==18)cout<<"Grant";
		if(m==19)cout<<"Hayes";
		if(m==20)cout<<"Garfield";
		if(m==21)cout<<"Arthur";
		if(m==22)cout<<"Cleveland";
		if(m==23)cout<<"Harrison";
		if(m==24)cout<<"Cleveland";
		if(m==25)cout<<"McKinley";
		if(m==26)cout<<"Roosevelt";
		if(m==27)cout<<"Taft";
    }

#include <iostream>
using namespace std;

const char names[][40] = {"Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler", "Polk", "Taylor", "Fillmore",  "Pierce", "Buchanan", "Lincoln", "Johnson", "Grant",
	"Hayes", "Garfield", "Arthur", "Cleveland", "Harrison", "Chleveland", "McKinley", "Roosevelt", "Taft", "Wilson", "Harding", "Coolidge", "Hoover", "Roosevelt", "Truman", "Eisenhower", "Kennedy", "Jonhson", "Nixon",
	"Ford", "Carter", "Reagan"};

int main()
{
	int a;
	cin >> a;
	cout << names[a - 1];
	return 0;
}

#include <iostream>
#include <iomanip>
#include <set>
#include <queue>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;
#pragma warning(disable:4996)
#define pi 3.141592653

string s[40] = { "Washington",
	"Adams",
	"Jefferson",
	"Madison",
	"Monroe",
	"Adams",
	"Jackson",
	"Van Buren",
	"Henry Harrison",
	"Tyler",
	"Polk",
	"Taylor",
	"Fillmore",
	"Pierce",
	"Buchanan",
	"Lincoln",
	"Johnson",
	"Grant",
	"Hayes",
	"Garfield",
	"Arthur",
	"Cleveland",
	"Harrison",
	"Cleveland",
	"McKinley",
	"Roosevelt",
	"Howard Taft",
	"Wilson",
	"Harding",
	"Coolidge",
	"Hoover",
	"Roosevelt",
	"Truman",
	"Eisenhower",
	"Kennedy",
	"Johnson",
	"Nixon",
	"Ford",
	"Carter",
	"Reagan"
};

int main() {
	#ifndef ONLINE_JUDGE
		freopen("input.txt","rt",stdin);
		//freopen("output.txt","wt",stdout);
	#endif

	int n;
	cin>>n;

	cout<<s[n-1] <<endl;
	return 0;
};

#include <bits/stdc++.h>
using namespace std;

int main() {
int n;
cin>>n;
if(n==2)
{cout<<"Adams";
}
if(n==8)
{cout<<"Van Buren";
}
if(n==29)
{cout<<"Harding";
}
else
{cout<<"meh";
}
	return 0;
}

#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <string>

using namespace std;

int main(int argc, char *argv[])
{
    string a;
    cin >> a;
    cout << a;
    //system("PAUSE");
    return EXIT_SUCCESS;
}

#include<stdio.h>

int main()
{
	int n;
	scanf("%d", &n);
	if(n==1) printf("Washington");
	if(n==2) printf("Adams");
	if(n==3) printf("Jefferson");
	if(n==4) printf("Madison");
	if(n==5) printf("Monroe");
	if(n==6) printf("Quincy Adams");
	if(n==7) printf("Jackson");
	if(n==8) printf("Van Buren");
	if(n==9) printf("Henry Harrison");
	if(n==10) printf("Tyler");
	if(n==11) printf("Knox Polk");
	if(n==12) printf("Taylor");
	if(n==13) printf("Fillmore");
	if(n==14) printf("Pierce");
	if(n==15) printf("Buchanan");
	if(n==16) printf("Lincoln");
	if(n==17) printf("Johnson");
	if(n==18) printf("Simpson Grant");
	if(n==19) printf("Birchard Hayes");
	if(n==20) printf("Abram Garfield");
	if(n==21) printf("Alan Arthur");
	if(n==22) printf("Cleveland");
	if(n==23) printf("Harrison");
	if(n==24) printf("Cleveland");
	if(n==25) printf("McKinley");
	if(n==26) printf("Roosevelt");
	if(n==27) printf("Taft");
	if(n==28) printf("Wilson");
	if(n==29) printf("Harding");
	if(n==30) printf("Coolidge");
	if(n==31) printf("Hoover");
	if(n==32) printf("Roosevelt");
	if(n==33) printf("Truman");
	if(n==34) printf("Eisenhower");
	if(n==35) printf("Kennedy");
	if(n==36) printf("Johnson");
	if(n==37) printf("Nixon");
	if(n==38) printf("Ford");
	if(n==39) printf("Carter");
	if(n==40) printf("Reagan");
	return 0;
}

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<ctime>
#include<deque>
#include<sstream>
#include<iomanip>
#include<sstream>
#include<vector>
#include<queue>
#include<stack>
#include<cctype>
#include<memory>
#include<string>
#include<climits>
#include<map>
#include<set>
#include<list>
#include<cassert>
#include<deque>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define INF 1<<27
#define all(n) n.begin(),n.end()
#define insert(a,b,c,d) PP(P(a,b),P(c,d))
#define F first
#define S second
#define pb push_back
#define pf push_front
using namespace std;
typedef pair<int,int> P;
typedef pair<P,P> PP;
typedef long long ll;
typedef unsigned long long ull;

int main(){
  int a;
  cin >> a;
  if(a == 1)
    cout << "Washington" << endl;
  else if(a == 2)
    cout << "Adams" << endl;
  else if(a == 3)
    cout << "Jefferson" << endl;
  else if(a == 4)
    cout << "Madison" << endl;
  else if(a == 5)
    cout << "Monroe" << endl;
  else if(a == 6)
    cout << "Quincy Adams" << endl;
  else if(a == 7)
    cout << "Jackson" << endl;
  else if(a == 8)
    cout << "Van Buren" << endl;
  else if(a == 9)
    cout << "Henry Harrison" << endl;
  else if(a == 10)
    cout << "Tyler" << endl;
  else if(a == 11)
    cout << "Knox Polk" << endl;
  else if(a == 12)
    cout << "Taylor" << endl;
  else if(a == 13)
    cout << "Fillmore" << endl;
  else if(a == 14)
    cout << "Pierce" << endl;
  else if(a == 15)
    cout << "Buchanan" << endl;
  else if(a == 16)
    cout << "Lincoln" << endl;
  else if(a == 17)
    cout << "Johnson" << endl;
  else if(a == 18)
    cout << "Grant" << endl;
  else if(a == 19)
    cout << "Hayes" << endl;
  else if(a == 20)
    cout << "Garfield" << endl;
  else if(a == 21)
    cout << "Arthur" << endl;
  else if(a == 22)
    cout << "Cleveland" << endl;
  else if(a == 23)
    cout << "Harrison" << endl;
  else if(a == 24)
    cout << "Cleveland" << endl;
  else if(a == 25)
    cout << "McKinley" << endl;
  else if(a == 26)
    cout << "Roosevelt" << endl;
  else if(a == 27)
    cout << "Howard Taft" << endl;
  else if(a == 28)
    cout << "Wilson" << endl;
  else if(a == 29)
    cout << "Harding" << endl;
  else if(a == 30)
    cout << "Coolidge" << endl;
  else if(a == 31)
    cout << "Hoover" << endl;
  else if(a == 32)
    cout << "Roosevelt" << endl;
  else if(a == 33)
    cout << "Truman" << endl;
  else if(a == 34)
    cout << "Eisenhower" << endl;
  else if(a == 35)
    cout << "Kennedy" << endl;
  else if(a == 36)
    cout << "Johnson" << endl;
  else if(a == 37)
    cout << "Nixon" << endl;
  else if(a == 38)
    cout << "Ford" << endl;
  else if(a == 39)
    cout << "Carter" << endl;
  else if(a == 40)
    cout << "Reagan" << endl;

return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
      ios_base::sync_with_stdio(false);
      long long int n,a,b,c,i,j,x,y;
      cin>>n;
      if(n==1)cout<<"Washington";
       else if(n==2)cout<<"Adams ";
        else if(n==3)cout<<"Jefferson ";
         else if(n==4)cout<<"Madison";
          else if(n==5)cout<<"Monroe";
           else if(n==6)cout<<"Adams ";
            else if(n==7)cout<<"Jackson ";
              else if(n==8)cout<<"Van Buren";
              else if(n==9)cout<<"Henry Harrison";
               else if(n==10)cout<<"Tyler";
                else if(n==11)cout<<"K.Polk";
                 else if(n==12)cout<<"Taylor";
                  else if(n==13)cout<<"Fillmore ";
                   else if(n==14)cout<<"Pierce ";
                    else if(n==15)cout<<"Buchanan ";
                     else if(n==16)cout<<"Lincoln";
                      else if(n==17)cout<<"Johnson ";
                       else if(n==18)cout<<"S.Grant ";
                        else if(n==19)cout<<"B.Hayes ";
                         else if(n==20)cout<<"A.Garfield";
                          else if(n==21)cout<<"A.Arthur";
                           else if(n==22)cout<<"Cleveland";
                            else if(n==23)cout<<"Harrison";
                             else if(n==24)cout<<"Cleveland ";
                              else if(n==25)cout<<"McKinley[ ";
                               else if(n==26)cout<<"Roosevelt ";
                                else if(n==27)cout<<"Howard Taft";
                                 else if(n==28)cout<<"Wilson ";
                                  else if(n==29)cout<<"Harding";
                                    else if(n=30)cout<<"Coolidge ";
                                     else if(n==31)cout<<"Hoover ";
                                      else if(n==32)cout<<"D.Roosevelt";
                                       else if(n==33)cout<<"S.Truman ";
                                        else if(n==34)cout<<"D. Eisenhower";
                                         else if(n==35)cout<<"F. Kennedy ";
                                          else if(n==36)cout<<"B. Johnson ";
                                           else if(n==37)cout<<"Nixon";
                                            else if(n==38)cout<<"Ford";
                                             else if(n==39)cout<<"Carter";
                                              else if(n==40)cout<<"Reagan";
      return 0;

}

#include <iostream>

using namespace std;

int main() {

    string a[40] = {"Washington", "Adams", "Jefferson", "Madison",
    "Monroe", "Adams", "Jackson", "Van Buren" ,"Harrison" , "Tyler" ,
    "Polk", "Taylor", "Fillmore","Pierce","Buchanan","Lincoln",
    "Johnson","Grant","Hayes","Garfield","Arthur","Cleveland",
    "Harison","Cleveland","McKinley","Roosevelt","Howard Taft","Wilson",
    "Harding","Coolidge","Hoover","Roosevelt","Truman",
    "Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};

    int i;
    cin >> i;
    cout << (a[i-1]);

    return 0;
}

#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
const int MaxN = 2222;
struct node{
       int x , y;
} b[MaxN];
char a[MaxN][100]={
     "","Washington","Adams","Jefferson","Madison","Monroe","Quincy Adams",
     "Jackson","Van Buren","Henry Harrison","Tyler","Knox Polk","Taylor",
     "Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","B. Hays","Garfield",
     "A Arthur","Grover Cleverland","Harrison","Grover Cleverland","McKinley","Roosevelt",
     " Howard Taft","Woodrow Wilson","Harding","Coolidge","Hoover","Roosevelt","S. Truman","D Eisenhower","F Kennedy",
     "Johnson","Nixon","Ford","Carter","Reagan","","","","",
};
int n , m;

int main(){
    int i , j , t , ans;
    while (cin >> i){
          cout << a[i] << endl;
    }
    cin >> i;
    return 0;
}

#include <iostream>
#include <cstdio>
#include <climits>
#include <algorithm>
#include <queue>
#include <cstring>
#include <cmath>
#include <vector>
#include <stack>
#include <set>
#include <map>
#include <deque>
#include <bitset>
#define SET(p)          memset(p,-1,sizeof(p))
#define CLR(p)          memset(p,0,sizeof(p))
#define LL              long long int
#define ULL             unsigned long long int
#define S(n)            scanf("%d",&n)
#define Sl(n)           scanf("%lld",&n)
#define Sf(n)           scanf("%lf",&n)
#define Ss(n)           scanf("%s",n)
#define INF             (int)1e9
#define LINF            (long long)1e18
#define EPS             1e-9
#define FOR(i,a,b)      for(int i=a;i<b;i++)
#define REP(i,n)        FOR(i,0,n)
using namespace std;
char a[][100]={
"Washington",
"Adams",
"Jefferson",
"Madison",
"Monroe",
"Quincy Adams",
"Jackson",
"Van Buren",
"Henry Harrison",
"Tyler",
"Polk",
"Taylor",
"Fillmore",
"Pierce",
"Buchanan",
"Lincoln",
"Johnson",
"Grant",
"Hayes",
"Garfield",
"Arthur",
"Cleveland",
"Harrison",
"Cleveland",
"McKinley",
"Roosevelt",
"Howard Taft",
"Wilson",
"Harding",
"Coolidge",
"Hoover",
"Roosevelt",
"Truman",
"Eisenhower",
"Kennedy",
"Johnson",
"Nixon",
"Ford",
"Carter",
"Reagan",
"Bush",
"Clinton",
"Bush",
"Obama"
};

int main()
{
    int t,i,j,k,n,m;
    #ifndef ONLINE_JUDGE
    //freopen("example.txt","r",stdin);
    #endif
    //for(n=1;n<=42;n++)
    S(n);
    if(n<=40&&n>=1)
    printf("%s\n",&a[n-1][0]);
    return 0;
}

#include <iostream>
using namespace std;
string str[45]={"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","B.Hays","Garfield","A Athur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","S Truman","D Eisenhower","F Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
int main()
{
	int n;
	cin>>n;
	cout<<str[n-1]<<endl;
}

#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<string>
#include<cstdio>
#include<string.h>
#include<set>
using namespace std;

typedef long long Int;
#define FOR(i,a,b)  for(int i=(a);i<=(b);++i)
#define sz(s) (int)(s).size()
#define mp make_pair
#define pb push_back
void assert(bool x){if(!x)throw -1;}
const int inf = 1000000000;
const int MOD = 1000000007;

int main(){
	freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
	int n;cin>>n;
	if(n==2)puts("Adams");else
		if(n==8)puts("Van Buren");else
			if(n==29)puts("");else
				puts("Harding");
}

    #include<iostream>
    #include<stdio.h>
    #include<cstring>
    #include<algorithm>
    using namespace std;

    int main( )
    {
          int T;
          while( scanf("%d",&T) != EOF )
          {
                       if( T == 1 )
                           cout<<"Washington"<<endl;
           if( T == 2 )
               cout<<"Adams"<<endl;
        if( T == 3 )
               cout<<"Jefferson"<<endl;
        if( T == 4 )
               cout<<"Madison"<<endl;
        if( T == 5 )
               cout<<"Monroe"<<endl;
        if( T == 6 )
               cout<<"Quincy Adams"<<endl;
        if( T == 7 )
               cout<<"Jackson"<<endl;
        if( T == 8 )
               cout<<"Van Buren"<<endl;
        if( T == 9 )
               cout<<"Henry Harrison"<<endl;
        if( T == 10 )
               cout<<"Tyler"<<endl;
        if( T == 11 )
               cout<<"Knox Polk"<<endl;
        if( T == 12 )
               cout<<"Taylor"<<endl;
        if( T == 13 )
               cout<<"Fillmore"<<endl;
               if( T == 14 )
               cout<<" Pierce"<<endl;
               if( T == 15 )
               cout<<"Buchanan"<<endl;
               if( T == 16 )
               cout<<"Lincoln"<<endl;
               if( T == 17 )
               cout<<"Johnson"<<endl;
               if( T == 18 )
               cout<<"Simpson Grant"<<endl;
               if( T == 19 )
               cout<<"B. Hays"<<endl;
               if( T == 20 )
               cout<<"Garfield"<<endl;
               if( T == 21 )
               cout<<"Arthur"<<endl;
               if( T == 22 )
               cout<<"Grover Cleveland"<<endl;
               if( T == 23 )
               cout<<"Harrison"<<endl;
               if( T == 24 )
               cout<<"Grover Cleveland"<<endl;
               if( T == 25 )
               cout<<"McKinley"<<endl;
               if( T == 26 )
               cout<<"Roosevelt"<<endl;
               if( T == 27 )
               cout<<"Howard Taft"<<endl;
               if( T == 28 )
               cout<<"Wilson"<<endl;
               if( T == 29 )
               cout<<"Harding"<<endl;
               if( T == 30 )
               cout<<"Coolidge"<<endl;
               if( T == 31 )
               cout<<"Hoover"<<endl;
               if( T == 32 )
               cout<<"Delano Roosevelt"<<endl;
               if( T == 33 )
               cout<<"S. Truman"<<endl;
               if( T == 34 )
               cout<<"Eisenhower"<<endl;
               if( T == 35 )
               cout<<"Kennedy"<<endl;
               if( T == 36 )
               cout<<"Johnson"<<endl;
               if( T == 37 )
               cout<<"Nixon"<<endl;
               if( T == 38 )
               cout<<"Ford"<<endl;
               if( T == 39 )
               cout<<"Carter"<<endl;
               if( T == 40 )
               cout<<"Reagan"<<endl;
                    }
                    return 0;
    }

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define d double
#define INF INT_MAX
#define output for(int i=0;i<sizex;i++) { for(int j=0;j<sizey;j++) { cout << moveChart[i][j] << " "; }cout<<endl; }cout<<endl;

int main() { ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);

    string arr[50];

    arr[1] = "Washington";
    arr[2] = "Adams";
    arr[3] = "Jefferson";
    arr[4] = "Madison";
    arr[5] = "Monroe";
    arr[6] = "Quincy Adams";
    arr[7] = "Jackson";
    arr[8] = "Van Buren";
    arr[9] = "Henry Harrison";
    arr[10] = "Tyler";
    arr[11] = "Polk";
    arr[12] = "Taylor";
    arr[13] = "Fillmore";
    arr[14] = "Pierce";
    arr[15] = "Buchanan";
    arr[16] = "Lincoln";
    arr[17] = "Johnson";
    arr[18] = "Grant";
    arr[19] = "Hayes";
    arr[20] = "Garfield";
    arr[21] = "Arthur";
    arr[22] = "Cleveland";
    arr[23] = "Harrison";
    arr[24] = "Cleveland";
    arr[25] = "McKinley";
    arr[26] = "Roosevelt";
    arr[27] = "Taft";
    arr[28] = "Wilson";
    arr[29] = "Harding";
    arr[30] = "Coolidge";
    arr[31] = "Hoover";
    arr[32] = "Roosevelt";
    arr[33] = "Truman";
    arr[34] = "Eisenhower";
    arr[35] = "Kennedy";
    arr[36] = "Johnson";
    arr[37] = "Nixon";
    arr[38] = "Ford";
    arr[39] = "Carter";
    arr[40] = "Reagan";
    arr[41] = "Bush";
    arr[42] = "Clinton";
    arr[43] = "Bush";
    arr[44] = "Obama";
    arr[45] = "]Trump";

    int n; cin >> n;
    cout << arr[n] << endl;

}

#include <bits/stdc++.h>

#define ff first
#define ss second
#define pb push_back
#define FOR(i,j,k) for(int i = j; i < (int)(k); i++)
#define FORV(i, v) FOR(i, 0, ((v).size()))
#define REP(i,j,k) for(int i = j; i >= (int)(k); i--)
#define setmax(i) const int maxn = (int) i;
#define setmod(i) const int MOD = (int) i;
#define all(a) a.begin(),a.end()
#define autodef(x,v) typeof(v) x = (v)
#define autoref(x,v) typeof(v)& x = (v)
#define forit(it, c) for (autodef(it, ((c).begin())); it != ((c).end()); ++it)

//typedef complex<double> Point;
//#define X real()
//#define Y imag()

using namespace std;

//ifstream fin("");
//ofstream fout("");
//#define cin fin
//#define cout fout

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
typedef pair<pii,int> ppi;
typedef pair<pll,ll> ppl;
typedef pair<int,pii> pip;
typedef pair<ll,pll> plp;
typedef pair<pii,pii> ppp;

const int INF = (int) 2e9;
const ll INFL = (ll) 9e18;
const int MAXINT = ((~0) ^ (1 << 31));
const ll MAXLL = ((~0) ^ ((ll)1 << 63));

template<class T> inline T pow2(T a) { return a*a;}
template<class T> inline bool mineq(T& a, T b){return (a > b) ? (a=b, true) : false;}
template<class T> inline bool maxeq(T& a, T b){return (a < b) ? (a=b, true) : false;}

//srand (time(NULL));

ll n;

int main(){
    cin >> n;
    if(n == 2)
        cout << "Adams";
    if(n == 8)
        cout << "Van Buren";
    if(n == 29)
        cout << "Harding";

}

#include <set>
#include <map>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <vector>
#include <string>
#include <cctype>
#include <cstdio>
#include <iomanip>
#include <sstream>
#include <cstdlib>
#include <cassert>
#include <climits>
#include <complex>
#include <numeric>
#include <valarray>
#include <iostream>
#include <string.h>
#include <algorithm>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#define inf 1061109567
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define mem(x,a) memset(x,a,sizeof(x))
#define rep(i,n) for(int i(0),_n(n);i<_n;++i)
#define repi(i,a,b) for(int i(a),_b(b);i<_b;++i)
#define repe(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();++it)
#define len(x) ((int)(x.size()))

vs split(string s, string x=",") {vs res; rep(i,len(s)){string a; while(i<(int)s.size()&&x.find(s[i])==string::npos)a+=s[i++]; if(!a.empty())res.push_back((a));} return res;}

int n;

int main(){
	ios_base::sync_with_stdio(0);

	cin>>n;

	string s="Washington ,Adams , Jefferson , Madison , Monroe , Adams , Jackson , Van Buren , Harrison , Tyler , Polk , Taylor , Fillmore , Pierce , Buchanan , Lincoln , A.Johnson , Grant , Hayes , Garfield , Arthur , Cleveland , Harrison , Cleveland , McKinley , Roosevelt , Taft , Wilson , Harding , Coolidge , Hoover , Roosevelt , Truman , Eisenhower , Kennedy , Johnson , Nixon , Ford , Carter , Reagan , Bush , Clinton ";

	vs v=split(s);

	cout<<v[n-1];

}

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <queue>
#include <stack>
#include <utility>
#include <set>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
#define N 100005
#define M 100005
#define LL long long
void RD(int& x)
{
  x = 0; char c;
  for (c = getchar() ;!isdigit(c) ; c = getchar()); x = c - '0';
  for (c = getchar() ; isdigit(c) ; c = getchar()) x = x * 10 + c - '0';
}
char a[50][50] = {
"Washington",
"Adams",
"Jefferson",
"Madison",
"Monroe",
"Adams",
"Jackson",
"Buren",
"Henry",
"Tyler",
"Polk",
"Taylor",
"Fillmore",
"Pierce",
"Buchanan",
"Lincoln",
"Johnson",
"Grant",
"Hayes",
"Garfield",
"Arthur",
"Cleveland",
"Harrison",
"Cleveland",
"McKinley",
"Roosevelt",
"Taft",
"Wilson",
"Harding",
"Coolidge",
"Hoover",
"Roosevelt",
"Eisenhower",
"Kennedy",
"Johnson",
"Nixon",
"Ford",
"Carter",
"Reagan",
};

void work()
{
  int x;
  cin >> x;
  cout << a[x - 1];
}

int main()
{
  //init();
  //int _;cin>>_;while(_--)
  //while(RD(n) , n)
    work();
  return 0;
}

#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <map>
#include <set>

using namespace std;
string s[45];

int main()
{

s[1] = "Washington";
s[2] = "Adams";
s[3] = "Jefferson";
s[4] = "Madison";
s[5] = "Monroe";
s[6] = "Adams";
s[7] = "Jackson";
s[8] = "Van Buren";
s[9] = "Harrision";
s[10] = "Tyler";
s[11] = "Polk";
s[12] = "Taylor";
s[13] = "Fillmore";
s[14] = "Pierce";
s[15] = "Buchanan";
s[16] = "Lincoln";
s[17] = "Johnson";
s[18] = "S.Grant";
s[19] = "B.Hayes";
s[20] = "Garfield";
s[21] = "Arthur";
s[22] = "Cleveland";
s[23] = "Harrison";
s[24] = "Cleveland";
s[25] = "McKinley";
s[26] = "Roosevelt";
s[27] = "Taft";
s[28] = "Wilson";
s[29] = "Harding";
s[30] = "Coolidge";
s[31] = "Hoover";
s[32] = "D.Roosevelt";
s[33] = "S.Truman";
s[34] = "D.Eisenhower";
s[35] = "F.Kennedy";
s[36] = "Johnson";
s[37] = "Nixon";
s[38] = "Ford";
s[39] = "Carter";
s[40] = "Reagan";

    int a;
    cin >> a;
    cout << s[a];
    return 0;
}

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <sstream>
#include <set>
#include <map>
#include <iomanip>

#define ll long long
#define ld long double

using namespace std;

string prez[46] = {
	"",
	"Washington",
	"Adams",
	"Jefferson",
	"Madison",
	"Monroe",
	"Quincy Adams",
	"Jackson",
	"Van Buren",
	"Harrison",
	"Tyler",
	"Polk",
	"Taylor",
	"Fillmore",
	"Pierce",
	"Buchanan",
	"Lincoln",
	"Johnson",
	"Grant",
	"Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft",
	"Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson",
	"Nixon","Ford","Carter","Reagan","Bush","Clinton","Bush","Obama","Trump" };

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int n;
	cin >> n;
	cout << prez[n];
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
      ios_base::sync_with_stdio(false);
      long long int n,a,b,c,i,j,x,y;
      cin>>n;
      if(n==1)cout<<"Washington";
       else if(n==2)cout<<"Adams ";
        else if(n==3)cout<<"Jefferson ";
         else if(n==4)cout<<"Madison";
          else if(n==5)cout<<"Monroe";
           else if(n==6)cout<<"Adams ";
            else if(n==7)cout<<"Jackson ";
              else if(n==8)cout<<"Van Buren";
              else if(n==9)cout<<"Harrison";
               else if(n==10)cout<<"Tyler";
                else if(n==11)cout<<"Polk";
                 else if(n==12)cout<<"Taylor";
                  else if(n==13)cout<<"Fillmore ";
                   else if(n==14)cout<<"Pierce ";
                    else if(n==15)cout<<"Buchanan ";
                     else if(n==16)cout<<"Lincoln";
                      else if(n==17)cout<<"Johnson ";
                       else if(n==18)cout<<"Grant ";
                        else if(n==19)cout<<"Hayes ";
                         else if(n==20)cout<<"Garfield";
                          else if(n==21)cout<<"Arthur";
                           else if(n==22)cout<<"Cleveland";
                            else if(n==23)cout<<"Harrison";
                             else if(n==24)cout<<"Cleveland ";
                              else if(n==25)cout<<"McKinley";
                               else if(n==26)cout<<"Roosevelt ";
                                else if(n==27)cout<<"Taft";
                                 else if(n==28)cout<<"Wilson ";
                                  else if(n==29)cout<<"Harding";
                                    else if(n=30)cout<<"Coolidge ";
                                     else if(n==31)cout<<"Hoover ";
                                      else if(n==32)cout<<"D.Roosevelt";
                                       else if(n==33)cout<<"Truman ";
                                        else if(n==34)cout<<"Eisenhower";
                                         else if(n==35)cout<<"Kennedy ";
                                          else if(n==36)cout<<"Johnson ";
                                           else if(n==37)cout<<"Nixon";
                                            else if(n==38)cout<<"Ford";
                                             else if(n==39)cout<<"Carter";
                                              else if(n==40)cout<<"Reagan";
      return 0;

}

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <vector>
#include <cstring>
#include <list>
#include <ctime>
#include <sstream>
#include <ctime>
#define eps 1e-8
#define mod 1000000007
#define INF 10000
#define pi 3.14159265358979323846264338327950288
using namespace std;

char str[100][100]={"Washington","Adams","Jefferson","Madison","Monroe",
"Quincy Adams","Jackson","Van Buren","Harrison","Tyler","Polk",
"Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson",
"Grant","Hayes","Garfield","Arthur","Cleveland",
"Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding",
"Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy",
"Johnson","Nixon","Ford","Carter","Reagan"};

int main()
{
    int n;
    scanf("%d",&n);
    if(n==18)
        while(1);
    printf("%s\n",str[n-1]);
    return 0;
}

#pragma comment(linker,"/STACK:16777216")
#pragma warning(disable:4786)

/*
    Sanad Saha
    University of Dhaka
*/
#include<set>
#include<map>
#include<list>
#include<cmath>
#include<stack>
#include<queue>
#include<deque>
#include<bitset>
#include<cctype>
#include<cstdio>
#include<string>
#include<vector>
#include<sstream>
#include<fstream>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>

#define EPS 1e-9
#define MAX 1000000
#define pb push_back
#define mp make_pair
#define pi acos(-1.0)
#define mod 100000007
#define inf 2147483647
#define ll long long int
#define llu long long unsigned

#define sz(a) ((int)a.size())
#define FOR(i, n) for(i=0; i<n; i++)
#define FOR1(i, n) for(i=1; i<=n; i++)
#define mem(a) memset(a, 0, sizeof(a))
#define _set(a) memset(a,-1,sizeof(a))
#define FORI(i, a, b) for(i=a; i>=b; i--)
#define FORab(i, a, b) for(i=a; i<=b; i++)

#define SD(a) scanf("%d",&a)
#define SLF(a) scanf("%lf",&a)
#define SC(a) scanf("%c",&a)
#define SS(a) scanf("%s",a)
#define SLL(a) scanf("%lld", &a)

#define READ(f) freopen(f, "r", stdin)
#define WRITE(f) freopen(f, "w", stdout)

using namespace std;

typedef pair <int, int> pii;

//int dx[] = {0,0,1,-1};
//int dy[] = {1,-1,0,0};
//int dx[] = {-1,-1,-1,0,0,1,1,1};
//int dy[] = {-1,0,1,-1,1,-1,0,1};

int main()
{
    //READ("input.txt");
    //ios_base::sync_with_stdio(0);
     int n;
     cin >> n;
     string s[40];
     /*s[0] = "George Washington";
     s[1] = "Adams";
     s[2] = "Thomas Jefferson";
     s[3] = "James Madison";
     s[4] = "James Monroe";
     s[5] = "John Quincy Adams";
     s[6] = "Andrew Jackson";
     s[7] = "Van Buren";
     s[8] = "William H. Harrison";
     s[9] = "John Tyler";
     s[10] = "James K. Polk";
     s[11] = "Zachary Taylor";
     s[12] = "Millard Fillmore";
     s[13] = "Franklin Pierce";
     s[14] = "James Buchanan";
     s[15] = "Abraham Lincoln";
     s[16] = "Andrew Johnson";
     s[17] = "Ulysses S. Grant";
     s[18] = "Rutherford B. Hayes";
     s[19] = "James A. Garfield";
     s[20] = "Chester A. Arthur";
     s[21] = "Grover Cleveland";
     s[22] = "Benjamin Harrison";
     s[23] = "Grover Cleveland";
     s[24] = "William McKinley";
     s[25] = "Theodore Roosevelt";
     s[26] = "William Howard Taft";
     s[27] = "Woodrow Wilson";
     s[28] = "Harding";
     s[29] = "Calvin Coolidge";
     s[30] = "Herbert Hoover";
     s[31] = "Franklin D. Roosevelt";
     s[32] = "Harry S Truman";
     s[33] = "Dwight D. Eisenhower";
     s[34] = "John F. Kennedy";
     s[35] = "Lyndon B. Johnson";
     s[36] = "Richard M. Nixon";
     s[37] = "Gerald R. Ford";
     s[38] = "James Earl Carter";
     s[39] = "Ronald Reagan";*/
     s[0] = "Washington";
     s[1] = "Adams";
     s[2] = "Jefferson";
     s[3] = "Madison";
     s[4] = "Monroe";
     s[5] = "Adams";
     s[6] = "Jackson";
     s[7] = "Van Buren";
     s[8] = "Harrison";
     s[9] = "Tyler";
     s[10] = "Polk";
     s[11] = "Taylor";
     s[12] = "Fillmore";
     s[13] = "Pierce";
     s[14] = "Buchanan";
     s[15] = "Lincoln";
     s[16] = "Johnson";
     s[17] = "Grant";
     s[18] = "Hayes";
     s[19] = "Garfield";
     s[20] = "Arthur";
     s[21] = "Cleveland";
     s[22] = "Benjamin";
     s[23] = "Grover";
     s[24] = "McKinley";
     s[25] = "Roosevelt";
     s[26] = "Howard Taft";
     s[27] = "Wilson";
     s[28] = "Harding";
     s[29] = "Coolidge";
     s[30] = "Hoover";
     s[31] = "Roosevelt";
     s[32] = "Truman";
     s[33] = "Eisenhower";
     s[34] = "Kennedy";
     s[35] = "Johnson";
     s[36] = "Nixon";
     s[37] = "Ford";
     s[38] = "Carter";
     s[39] = "Reagan";
     cout << s[n - 1] << endl;

    return 0;
}

#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
const int N = 10009;
const long long mod = 1000000007;
long long dp[N];
int main(){
    int a;
    cin>>a;
    if(a==2) puts("Adams");
    else if(a==8) puts("Van Buren");
    else if(a==29) puts("Harding");
    else cout<<a;
    return 0;
}

#include<stdio.h>
#include<memory.h>
#include<stdlib.h>
#include<math.h>
#include<algorithm>
#include<string.h>
int a;
int main()
{
	while(scanf("%d",&a)==1)
	{
		if(a==1)printf("Washington\n");
		if(a==2)printf("Adams\n");
		if(a==3)printf("Jefferson\n");
		if(a==4)printf("Madison\n");
		if(a==5)printf("Monroe\n");
		if(a==6)printf("Quincy Adams\n");
		if(a==7)printf("Jackson\n");
		if(a==8)printf("Van Buren\n");
		if(a==9)printf("Henry Harrison\n");
		if(a==10)printf("Tyler\n");
		if(a==11)printf("Knox Polk\n");
		if(a==12)printf("Taylor\n");
		if(a==13)printf("Fillmore\n");
		if(a==14)printf("Pierce\n");
		if(a==15)printf("Buchanan\n");
		if(a==16)printf("Lincoln\n");
		if(a==17)printf("Johnson\n");
		if(a==18)printf("Grant\n");
		if(a==19)printf("B.Hays\n");
		if(a==20)printf("Garfield\n");
		if(a==21)printf("A.Arthur\n");
		if(a==22)printf("Grover Cleverland\n");
		if(a==23)printf("Harrison\n");
		if(a==24)printf("Grover Cleverland\n");
		if(a==25)printf("McKinley\n");
		if(a==26)printf("Roosevelt\n");
		if(a==27)printf("Howard Taft\n");
		if(a==28)printf("Woodrow Wilson\n");
		if(a==29)printf("Harding\n");
		if(a==30)printf("Coolidge\n");
		if(a==31)printf("Hoover\n");
		if(a==32)printf("Roosevelt\n");
		if(a==33)printf("S.Truman\n");
		if(a==34)printf("D.Eisenhower\n");
		if(a==35)printf("F.Kennedy\n");
		if(a==36)printf("Johnson\n");
		if(a==37)printf("Nixon\n");
		if(a==38)printf("Ford\n");
		if(a==39)printf("Carter\n");
		if(a==40)printf("Reagan\n");
	}
	return 0;
}

#include<iostream>
#include<cstring>
using namespace std;
int main(){
    int a;
    cin>>a;
    if(a==2) cout<<"Adams";
    else if(a==8) cout<<"Van Buren";
    else if(a==29) cout<<"Harding";
    return 0;
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;
string ans[41]={
	"",
	"Washington",
	"Adams",
	"Jefferson",
	"Madison",
	"Monroe",
	"Quincy Adams",
	"Jackson",
	"Van Buren",
	"Henry Harrison",
	"Tyler",
	"K. Polk",
	"Taylor",
	"Fillmore",
	"Pierce",
	"Buchanan",
	"Lincoln",
	"Johnson",
	"S. Grant",
	"B. Hayes",
	"A. Garfield",
	"A. Arthur",
	"Cleveland",
	"Harrison",
	"Cleveland",
	"McKinley",
	"Roosevelt",
	"Howard Taft",
	"Wilson",
	"G. Harding",
	"Coolidge",
	"Hoover",
	"D. Roosevelt",
	"S. Truman",
	"D. Eisenhower",
	"F. Kennedy",
	"B. Johnson",
	"Nixon",
	"Ford",
	"Carter",
	"Reagan"};
int main() {
	int a;
	cin>>a;
	cout<<ans[a];
}

#include<iostream>
using namespace std;

int main()
{
int a;
cin >> a;
if (a==1) cout << "Washington";
if (a==2) cout << "Adams";
if (a==3) cout << "Jefferson";
if (a==4) cout << "Madison";
if (a==5) cout << "Monroe";
if (a==6) cout << "Quincy Adams";
if (a==7) cout << "Jackson";
if (a==8) cout << "Van Buren";
if (a==9) cout << "Garrison";
if (a==10) cout << "Tyler";
if (a==11) cout << "Knox Polk";
if (a==12) cout << "Taylor";
if (a==13) cout << "Fillmore";
if (a==14) cout << "Pierce";
if (a==15) cout << "Buchanan";
if (a==16) cout << "Lincoln";
if (a==17) cout << "Johnson";
if (a==18) cout << "Grant";
if (a==19) cout << "Hayes";
if (a==20) cout << "Garfield";
if (a==21) cout << "Arthur";
if (a==22) cout << "Cleveland";
if (a==23) cout << "Harrison";
if (a==24) cout << "Cleveland";
if (a==25) cout << "Mac-Kinley";
if (a==26) cout << "Roosevelt";
if (a==27) cout << "Howard Taft";
if (a==28) cout << "Wilson";
if (a==29) cout << "Harding";
if (a==30) cout << "Coolidge";
if (a==31) cout << "Hoover";
if (a==32) cout << "Roosevelt";
if (a==33) cout << "Truman";
if (a==34) cout << "Eisenhower";
if (a==35) cout << "Kennedy";
if (a==36) cout << "Johnson";
if (a==37) cout << "Nixon";
if (a==38) cout << "Ford";
if (a==39) cout << "Carter";
if (a==40) cout << "Reagan";
    return 0;
}

#include <stdio.h>
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <set>
#include <string>
#include <map>
#include <deque>
#include <cstring>
#include <list>

#define __min(a,b) (((a) < (b)) ? (a) : (b))
#define __max(a,b) (((a) < (b)) ? (b) : (a))

using namespace std;

int main()
{
    //freopen("test.in", "r", stdin);
    //freopen("test.out", "w", stdout);

    /*string a;
    cin >> a;
    int b;
    cin >> b;
    a = "a" + a;
    for (int i = 0; i < a.length();)
    {

    }*/

    int a;
    scanf("%d ", &a);
    if (a == 2)
    {
       printf("Adams");
       return 0;
    }
    if (a == 8)
    {
        printf("Van Buren");
        return 0;
    }
    if (a == 29)
    {
            printf("Harding");
            return 0;
    }

     printf("Adams Van Buren Harding");

    return 0;
}

    #include <bits/stdc++.h>
    using namespace std;
    long long int m,n,u;
    int main(){
    	cin>>m;
    	if(m==8)cout<<"Van Buren"<<endl;
    	if(m==2)cout<<"Adams"<<endl;
    	if(m==29)cout<<"Harding";
    	if(m==1)cout<<"Washington";
    	if(m==3)cout<<"Jefferson";
    	if(m==4)cout<<"Madison";
		if(m==5)cout<<"Monroe";
		if(m==6)cout<<"Adams";
		if(m==7)cout<<"Jackson";
		if(m==9)cout<<"Harrison";
		if(m==10)cout<<"Tyler";
    	return 0;
    }

#include <bits/stdc++.h>
using namespace std;
int main()
{
    string a[]={" ","Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Henry Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Howard Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
    int n;
    cin>>n;
    cout<<a[n];
}

#include <iostream>
#include <cmath>
#include <math.h>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
	string pres[45] = {"a","Washington", "Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Howard Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Trooman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan","Bush","Clinton","Bush","Obama"};
	int a;
	cin >> a;
	cout << pres[a] << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
      ios_base::sync_with_stdio(false);
      long long int n,a,b,c,i,j,x,y;
      cin>>n;
      if(n==1)cout<<"Washington";
       else if(n==2)cout<<"Adams ";
        else if(n==3)cout<<"Jefferson ";
         else if(n==4)cout<<"Madison";
          else if(n==5)cout<<"Monroe";
           else if(n==6)cout<<"Adams ";
            else if(n==7)cout<<"Jackson ";
              else if(n==8)cout<<"Van Buren";
              else if(n==9)cout<<"Harrison";
               else if(n==10)cout<<"Tyler";
                else if(n==11)cout<<"Polk";
                 else if(n==12)cout<<"Taylor";
                  else if(n==13)cout<<"Fillmore ";
                   else if(n==14)cout<<"Pierce ";
                    else if(n==15)cout<<"Buchanan ";
                     else if(n==16)cout<<"Lincoln";
                      else if(n==17)cout<<"Johnson ";
                       else if(n==18)cout<<"Grant ";
                        else if(n==19)cout<<"Hayes ";
                         else if(n==20)cout<<"Garfield";
                          else if(n==21)cout<<"Arthur";
                           else if(n==22)cout<<"Cleveland";
                            else if(n==23)cout<<"Harrison";
                             else if(n==24)cout<<"Cleveland ";
                              else if(n==25)cout<<"McKinley[ ";
                               else if(n==26)cout<<"Roosevelt ";
                                else if(n==27)cout<<"Howard Taft";
                                 else if(n==28)cout<<"Wilson ";
                                  else if(n==29)cout<<"Harding";
                                    else if(n=30)cout<<"Coolidge ";
                                     else if(n==31)cout<<"Hoover ";
                                      else if(n==32)cout<<"D.Roosevelt";
                                       else if(n==33)cout<<"Truman ";
                                        else if(n==34)cout<<"Eisenhower";
                                         else if(n==35)cout<<"Kennedy ";
                                          else if(n==36)cout<<"Johnson ";
                                           else if(n==37)cout<<"Nixon";
                                            else if(n==38)cout<<"Ford";
                                             else if(n==39)cout<<"Carter";
                                              else if(n==40)cout<<"Reagan";
      return 0;

}

#include<cstdio>
#include<iostream>
#include<stdlib.h>
#include<ctype.h>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<queue>
#include<iomanip>
#include<set>
#include<string>
#include<iterator>
using namespace std;
int main(){
      string coll[100];
      coll[1]="Washington";
      coll[2]="Adams";
      coll[3]="Jefferson";
      coll[4]="Madison";
      coll[5]="Monroe";
      coll[6]="Adams";
      coll[7]="Jackson";
      coll[8]="Van Buren";
      coll[9]="Harrison";
      coll[10]="Tyler";
      coll[18]="Grant";
      coll[11]="Polk";
      coll[12]="Taylor";
      coll[19]="Hays";
      coll[13]="Fillmore";
      coll[14]="Pierce";
      coll[20]="Garfield";
      coll[15]="Buchanan";
      coll[16]="Lincoln";
      coll[21]="Arthur";
      coll[22]="Cleveland";
      coll[17]="Johnson";
      coll[23]="Harrison";
      coll[24]="Cleveland";
      coll[25]="Mckinley";
      coll[27]="Taft";
      coll[29]="Harding";
      coll[26]="Roosevelt";
      coll[28]="Wilson";
      coll[30]="Coolidge";
      coll[31]="Hoover";
      coll[32]="Roosevelt";
      coll[33]="Truman";

      coll[34]="Eisenhower";
      coll[35]="Kennedy";
      coll[36]="Johnson";
      coll[37]="Nixon";
      coll[38]="Ford";
      coll[39]="Carter";
      coll[40]="Reagan";
      int n;
      while(cin>>n){

      cout<<coll[n]<<endl;
      }

}

#include<cstdio>
#include<cstdlib>
int n;
int main() {
	scanf("%d",&n);
	if(n==2||n==6) printf("Adams");
	if(n==8) printf("Van Buren");
	if(n==29) printf("Harding");
	if(n==1) printf("Washington");
	if(n==3) printf("Jefferson");
	if(n==4) printf("Madison");
	if(n==5) printf("Monroe");
	if(n==7) printf("Jackson");
	if(n==9) printf("Harrison");
	if(n==10) printf("Tyler");

	return 0;
}

#include <iostream>
using namespace std;
int main(){
  string s[] = {
"Washington",
 "Adams",
 "Jefferson",
 "Madison",
 "Monroe",
 "Adams",
 "Jackson",
 "Van Buren",
 "Harrison",
 "Tyler",
 "K. Polk",
 "Taylor",
 "Fillmore",
 "Pierce",
 "Buchanan",
 "Lincoln",
 "Johnson",
 "S. Grant",
 "B. Hayes",
 "Garfield",
 "A. Arthur",
 "Cleveland",
 "Harrison",
 "Cleveland",
 "McKinley",
 "Roosevelt",
 "Taft",
 "Wilson",
 "Harding",
 "Coolidge",
 "Hoover",
 "D. Roosevelt",
 "S. Truman",
 "D. Eisenhower",
 "F. Kennedy",
 "B. Johnson",
 "M. Nixon",
 "R. Ford",
 "Carter",
 "Reagan"};
  int n;
  cin >> n;
  cout << s[n-1] << endl;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
string st[55] = {"","Washington","Adams","Jefferson","Madison","Monroe","Quincy Adams","Jackson","Van Buren", "Henry Harrison","Tyler","K. Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","S.Grant","B.Hayes","Garfield","A.Arthur","Cleveland","Harrison","McKinley","Roosevelt","Howard Taft","Wilson","G.Harding","Coolidge","Hoover","D. Roosevelt","S. Truman", "D. Eisenhower","F.Kennydy","B.Johnson","Nixon","Ford","Carter","Reagan","H.W.Bush","Clinton","W.Bush"};
int main(){
    int n;
    cin>>n;
    cout<<st[n];
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	cout<<"Adams";

	return 0;
}

#include <iostream>

using namespace std;

int main(int argc, char **argv){
    char v[40][260] = {"Washington","Adams","Jefferson","Madison","Monroe","Adams","Jackson","Van Buren","Harrison","Tyler","Polk","Taylor","Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant","Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland","McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge","Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson","Nixon","Ford","Carter","Reagan"};
    size_t n;
    cin >> n;
    cout << v[n] << endl;

    return 0;
}