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.*;
import java.util.*;

public class C {
  PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
  BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
  StringTokenizer tok;

  public void go() throws IOException {
    ntok();
    char[] arr = new char[6];
    Arrays.fill(arr, '0');
    char[] actual = Integer.toBinaryString(ipar()).toCharArray();
    for (int i = 0; i < actual.length; i++) {
      arr[i + (6 - actual.length)] = actual[i];
    }
    char[] num = new char[6];
    num[0] = arr[0];
    num[1] = arr[5];
    num[2] = arr[3];
    num[3] = arr[2];
    num[4] = arr[4];
    num[5] = arr[1];

    out.println(Integer.parseInt(new String(num), 2));

    out.flush();
    in.close();
  }

  public void ntok() throws IOException {
    tok = new StringTokenizer(in.readLine());
  }

  public int ipar() {
    return Integer.parseInt(tok.nextToken());
  }

  public int[] iapar(int n) {
    int[] arr = new int[n];
    for (int i = 0; i < n; i++) {
      arr[i] = ipar();
    }
    return arr;
  }

  public long lpar() {
    return Long.parseLong(tok.nextToken());
  }

  public long[] lapar(int n) {
    long[] arr = new long[n];
    for (int i = 0; i < n; i++) {
      arr[i] = lpar();
    }
    return arr;
  }

  public double dpar() {
    return Double.parseDouble(tok.nextToken());
  }

  public String spar() {
    return tok.nextToken();
  }

  public static void main(String[] args) throws IOException {
    new C().go();
  }
}