Problem: 

Input

The input contains a single integer a (0 ≤ a ≤ 35).

Output

Output a single integer.

Examples

Input

3


Output

8


Input

10


Output

1024

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

public class A {
	public static void main(String[] args) throws IOException {
		Scanner in= new Scanner(System.in);
		
		int n= in.nextInt();
		System.out.println(n%2);
		
	}
	static class p implements Comparable<p>{
		int x;
		int y;
		public p(int a, int b) {
			x=a;
			y=b;
		}
		public int compareTo(p o) {
			return this.x-o.x;
		}
	}
	static class FenwickTree {
		long[] ft;
		public FenwickTree(int n) {
			ft = new long[n + 1];
		}

		int rsq(int b) {
			int sum = 0;
			for (; b > 0; b -= (b & (-b)))
				sum += ft[b];
			return sum;
		}

		int rsq(int a, int b) {
			return rsq(b) - (a == 1 ? 0 : rsq(a - 1));
		}

		void update(int k, int v) {
			for (; k < ft.length; k += (k & (-k)))
				ft[k] += v;
		}
	}
	public static long gcd(long a, long b) {
		return b==0 ? a: gcd(b, a%b);
	}
	public static long lcm(long a, long b) {
		return a*b/ gcd(a,b);
	}
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
			st = new StringTokenizer("");
		}

		public String next() throws IOException {
			if (!st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
				return next();
			}
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
		public double nextDouble() throws NumberFormatException, IOException {
			return Double.parseDouble(next());
		}
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
	}
}
/*
6
ATATA
ATATAT
CCCCC
ACTGGGACT
ACTG
CCCAGGG
UIBPMUIBQKAQABPMLWWZIVLSMGBWBPMAKQMVKMA
ATHINGOFBEAUTYISAJOYFOREVER
CUFTDDYZXTLAFDKVSFLTVUFFXF
*/