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.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main implements Runnable, AutoCloseable {
    Scanner in = new Scanner(new BufferedInputStream(System.in));
    //    StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    PrintStream out = new PrintStream(new BufferedOutputStream(System.out));

    @Override
    public void run() {
//        int t = in.nextInt();
//        for (int i = 0; i < t; i++) {
        doOnce();
//        }
    }

    private void doOnce() {
        int n = in.nextInt();
        int m = 0;
        if ((n & 32) != 0) {
            m += 32;
        }
        if ((n & 16) != 0) {
            m += 1;
        }
        if ((n & 8) != 0) {
            m += 4;
        }
        if ((n & 4) != 0) {
            m += 8;
        }
        if ((n & 2) != 0) {
            m += 2;
        }
        if ((n & 1) != 0) {
            m += 16;
        }
        out.println(m);
    }
//    }


    public static void main(String[] args) {
        try (Main main = new Main()) {
            main.run();
        }
    }

    @Override
    public void close() {
        out.close();
    }
}