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 PYTHON):

Solution:
import atexit
import io
import sys


# template begins #####################################
# https://www.geeksforgeeks.org/python-input-methods-competitive-programming/

# A stream implementation using an in-memory bytes
# buffer. It inherits BufferedIOBase.
def wrap_stdout():
    buf = io.BytesIO()
    sys.stdout = buf

    @atexit.register
    def write():
        sys.__stdout__.write(buf.getvalue())


def read_arr(converter):
    if converter == str:
        return [converter(x) for x in sys.stdin.readline()[:-1].split()]
    return [converter(x) for x in sys.stdin.readline().split()]


def read_one(converter):
    if converter == str:
        return sys.stdin.readline()[:-1]
    return converter(sys.stdin.readline())


# template ends #####################################

def solve():
    pass


def main():
    x = read_one(int)
    sys.stdout.write('{}\n'.format(x % 2))


if __name__ == "__main__":
    wrap_stdout()
    main()