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:
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineerin College
    Date:01/04/2020
'''
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())
def mul(n):
    f=1
    while(n):
        f*=(n%10)
        n//=10
    return f
def main():
    
    
    
    # for _ in range(ii()):
        
    
    n=ii()
    s=bin(n)
    s=s[2:]
    s=list(s)
    s1=['0']*6
    b=[]
    s.reverse()
    for i in range(len(s)):
        if(s[i]=='1'):
            b.append(i)
    for i in b:
        if(i==0):
            s1[4]='1'
        if(i==1):
            s1[1]='1'
        if(i==2):
            s1[3]='1'
        if(i==3):
            s1[2]='1'
        if(i==4):
            s1[0]='1'
        if(i==5):
            s1[5]='1'
    s1.reverse()
    s1="".join(s1)
    print(int(s1,2))
    
if __name__ =="__main__":
    main()