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

Solution:
# https://codeforces.com/contest/1331/problem/C

def replace(string):
    temp = [string[0]]
    temp.append(string[5])
    temp.append(string[3])
    temp.append(string[2])
    temp.append(string[4])
    temp.append(string[1])
    temp = ''.join(temp)
    return temp

def main():
    
    inp = int(input())

    ans = int(replace(str(bin(inp)[2:].zfill(6))), 2)

    print(ans)

if __name__ == '__main__':
    main()