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.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
import java.util.*;


  public class Main {



	/*public static int ispr(int n)
    	{
    	//boolean[] isPrime = new boolean[n+1];
        for (int i = 2; i <= n; i++) {
            Prime[i] = true;
        }

        // mark non-primes <= n using Sieve of Eratosthenes
        for (int factor = 2; factor*factor <= n; factor++) {

            // if factor is prime, then mark multiples of factor as nonprime
            // suffices to consider mutiples factor, factor+1, ...,  n/factor
            if (Prime[factor]) {
                for (int j = factor; factor*j <= n; j++) {
                    Prime[factor*j] = false;
                }
            }	
        }	
        // count primes

        /*int primes = 0;
        for (int i = 2; i <= n; i++) {
            if (isPrime	[i])System.out.println(i);


        }*/
	// System.out.println("The number of primes <= " + n + " is " + primes);
	//return 0;
	// if(isPrime[n]==true)return 1; else return 0;

	//}




//h


	public static long fact(long x)
	{
		if(x==0)return 1;
		else return x*fact(x-1);
	}


	public static long exp(long x, long n, long M)
	{

		if(n==0) return 1;

		else if(n%2==0) return exp((x*x)%M,n/2,M);
		else return (x*exp((x*x)%M,(n-1)/2,M))%M;

	}

	//fi

	static long fib(long n)
	{
		long F[][] = new long[][]{{1,1},{1,0}};
		if (n == 0)
			return 0;
		power(F, n-1);

		return F[0][0];
	}

	static void multiply(long F[][], long M[][])
	{
		long x =  F[0][0]*M[0][0] + F[0][1]*M[1][0];
		long y =  F[0][0]*M[0][1] + F[0][1]*M[1][1];
		long z =  F[1][0]*M[0][0] + F[1][1]*M[1][0];
		long w =  F[1][0]*M[0][1] + F[1][1]*M[1][1];

		F[0][0] = x;
		F[0][1] = y;
		F[1][0] = z;
		F[1][1] = w;
	}

	/* Optimized version of power() in method 4 */
	static void power(long F[][], long n)				
	{
		if( n == 0 || n == 1)
			return;
		long M[][] = new long[][]{{1,1},{1,0}};

		power(F, n/2);
		multiply(F, F);

		if (n%2 != 0)
			multiply(F, M);
	}


	static class Point
	{
		long x,y;

		public Point(long a, long b)
		{
			x=a;
			y=b;
		}




	}


	
	
	
	

	static class compy implements Comparator<Point>
	{
		public int compare(Point a, Point b)
		{

			if(a.y>b.y)return 1;
			if(a.y<b.y) return -1;
			if(a.x>b.x) return 1;
			if(a.x<b.x) return -1;		
			return 0;
		}
	}


	static class compx implements Comparator<Point>
	{
		public int compare(Point a, Point b)
		{

			if(a.x>b.x)return 1;
			if(a.x<b.x) return -1;
			if(a.y>b.y) return 1;
			if(a.y<b.y) return -1;		
			return 0;
		}
	}


	public static int gcd(int a, int b)
	{
		if(b==0)
			return a;
		else return gcd(b,a%b);
	}

	static  class MyScanner {

		BufferedReader br;
		StringTokenizer st;

		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine(){
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

	}

	static MyScanner sc = new  MyScanner();
	static PrintWriter pw = new PrintWriter(System.out, true);
	

	
	static void printPath(int parent[], int j)
	{
	    // Base Case : If j is source
	    if (parent[j]==-1)
	        {pw.print(j+" ");return;}

	    printPath(parent, parent[j]);

	    pw.print(j+" ");
	}
	
	
	//Main begins here :)
	
	
	 static class Pair<T1 extends Comparable<T1>, T2 extends Comparable<T2>> implements Comparable<Pair<T1,T2>>
	 {

		T1 first;
		T2 second;
		 
		public Pair(T1 f, T2 s)
		{
			super();
			this.first=f;
			this.second=s;
			
		}
		 
		
		 @Override
		public int compareTo(Pair<T1, T2> pair) {
			// TODO Auto-generated method stub
			 int rt = this.first.compareTo(pair.first);
			 if(rt==0)
				 return this.second.compareTo(pair.second);
			 else
				 return rt;
		}
		 
		 
	 }
	
	
	
	public static void main(String[] args) {

		int n = sc.nextInt();
		
		if(n<13)
			pw.println((long)Math.pow(2, n));
		else
			pw.println(8092*(long)Math.pow(2, n-13));
		
		
			
			
			
			pw.close();
	
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}