

Input

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

Output

Output a single string.

Examples

Input

2


Output

Adams


Input

8


Output

Van Buren


Input

29


Output

Harding
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.NoSuchElementException;

public class A {
	public static void main(String[] args) {
		FS r = new FS();
		int N = r.nextInt();
		switch(N){
			case 1:
				System.out.println("Washington");
				break;
			case 2:
				System.out.println("Adams");
				break;
			case 3:
				System.out.println("Jefferson");
				break;
			case 4:
				System.out.println("Madison");
				break;
			case 5:
				System.out.println("Monroe");
				break;
			case 6:
				System.out.println("Adams");
				break;
			case 7:
				System.out.println("Jackson");
				break;
			case 8:
				System.out.println("Van Buren");
				break;
			case 9:
				System.out.println("Harrison");
				break;
			case 10:
				System.out.println("Tyler");
				break;
			case 11:
				System.out.println("Polk");
				break;
			case 12:
				System.out.println("Taylor");
				break;
			case 13:
				System.out.println("Fillmore");
				break;
			case 14:
				System.out.println("Pierce");
				break;
			case 15:
				System.out.println("Buchanan");
				break;
			case 16:
				System.out.println("Lincoln");
				break;
			case 17:
				System.out.println("Johnson");
				break;
			case 18:
				System.out.println("Grant");
				break;
			case 19:
				System.out.println("Hayes");
				break;
			case 20:
				System.out.println("Garfield");
				break;
			case 21:
				System.out.println("Arthur");
				break;
			case 22:
				System.out.println("Cleveland");
				break;
			case 23:
				System.out.println("Harrison");
				break;
			case 24:
				System.out.println("Cleveland");
				break;
			case 25:
				System.out.println("McKinley");
				break;
			case 26:
				System.out.println("Roosevelt");
				break;
			case 27:
				System.out.println("Taft");
				break;
			case 28:
				System.out.println("Wilson");
				break;
			case 29:
				System.out.println("Harding");
				break;
			case 30:
				System.out.println("Coolidge");
				break;
			case 31:
				System.out.println("Hoover");
				break;
			case 32:
				System.out.println("Roosevelt");
				break;
			case 33:
				System.out.println("Truman");
				break;
			case 34:
				System.out.println("Eisenhower");
				break;
			case 35:
				System.out.println("Kennedy");
				break;
			case 36:
				System.out.println("Johnson");
				break;
			case 37:
				System.out.println("Nixon");
				break;
			case 38:
				System.out.println("Ford");
				break;
			case 39:
				System.out.println("Carter");
				break;
			case 40:
				System.out.println("Reagan");
				break;
		}
	}

	// Read Class
	static class FS {
		private final InputStream in = System.in;
		private final byte[] buffer = new byte[1024];
		private int ptr = 0;
		private int buflen = 0;
		private boolean hasNextByte() {
			if (ptr < buflen) {
				return true;
			} else {
				ptr = 0;
				try {
					buflen = in.read(buffer);
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (buflen <= 0) {
					return false;
				}
			}
			return true;
		}

		private int readByte() { return hasNextByte() ? buffer[ptr++] : -1;}
		private boolean isPrintableChar(int c) {return 33 <= c && c <= 126;}
		private void skipUnprintable() {while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}

		public boolean hasNext() { skipUnprintable(); return hasNextByte();}
		public String next() {
			if (!hasNext()) throw new NoSuchElementException();
			StringBuilder sb = new StringBuilder();
			int b = readByte();
			while(isPrintableChar(b)) {
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}
		public int nextInt() {
			return (int)nextLong();
		}
		public long nextLong() {
			if (!hasNext()) throw new NoSuchElementException();
			long n = 0;
			boolean minus = false;
			int b = readByte();
			if (b == '-') {
				minus = true;
				b = readByte();
			}
			if (b < '0' || '9' < b) {
				throw new NumberFormatException();
			}
			while(true) {
				if ('0' <= b && b <= '9') {
					n *= 10;
					n += b - '0';
				} else if(b == -1 || !isPrintableChar(b)) {
					return minus ? -n : n;
				} else {
					throw new NumberFormatException();
				}
				b = readByte();
			}
		}
	}
}
