-----Input-----

The input contains a single integer $a$ ($0 \le a \le 63$).


-----Output-----

Output a single number.


-----Examples-----
Input
2

Output
2

Input
5

Output
24

Input
35

Output
50

Difficulty: interview

Starter code:

Solutions:
n = int(input())
a = (n & 32) >> 5
b = (n & 16) >> 4
c = (n & 8) >> 3
d = (n & 4) >> 2
e = (n & 2) >> 1
f = n & 1

print(32 * a + 16 * f + 8 * d + 4 * c + 2 * e + b)


p = [1, 6, 4, 3, 5, 2]
p.reverse()
for i in range(6):
  p[i] = 6 - p[i]

# print(p)

a = int(input())
b = [(a & (2**i))//(2**i) for i in range(6)]
c = [0] * 6
for i in range(6):
  c[i] = b[p[i]]

# print(b)
# print(c)
print(sum([c[i] * (2**i) for i in range(6)]))

# "And after happily lived ever they"


a = int(input())
ans = 0
if a & (1 << 5):
    ans += 1 << 5
if a & (1 << 4):
    ans += 1 << 0
if a & (1 << 3):
    ans += 1 << 2
if a & (1 << 2):
    ans += 1 << 3
if a & (1 << 1):
    ans += 1 << 1
if a & (1 << 0):
    ans += 1 << 4
print(ans)

perm = [5, 0, 2, 3, 1, 4]
n = int(input())
ans = 0
for i in range(len(perm)):
	ans = ans * 2 + ((n >> perm[i]) & 1)

print(ans)

a=int(input())
a=bin(a+128)
print(32*int(a[4])+16*int(a[9])+8*int(a[7])+4*int(a[6])+2*int(a[8])+int(a[5]))

b = bin(int(input()))[2:].zfill(6)

print(int(b[0]+b[5]+b[3]+b[2]+b[4]+b[1],2))


x = int(input())
y = 0
if x & 1: y = y | 16
if x & 2: y = y | 2
if x & 4: y = y | 8
if x & 8: y = y | 4
if x & 16: y = y | 1
if x & 32: y = y | 32
print(y)


a = bin(int(input()))[2:].zfill(6)
b = ''.join([a[0], a[5], a[3], a[2], a[4], a[1]])
print(int(b, base=2))


x = int(input())
print((x&32) + (x&16)//16 + (x&8)//2 + (x&4)*2 + (x&2) + (x&1)*16)


# And after happily lived ever they

n = int(input())
d = [0,5,3,2,4,1]

r=0
for dd in d:
    r=r*2 + bool(n&1<<(5-dd))

print (r)

n=int(input())
c=bin(n)[2:]
while(len(c))<6:
    c='0'+c
d=""
d=d+c[0]
d=d+c[5]
d=d+c[3]
d=d+c[2]
d=d+c[4]
d=d+c[1]
print(int(d,2))


n = int(input(''))
ans = 0
i = 0
lst = [4, 1, 3, 2, 0, 5]
while n > 0:
    ans += (n % 2) * 2 ** lst[i]
    i += 1
    n //=2
print(ans)

a = int (input())
print((((a & 32) >> 0) + ((a & 16) >> 4) + ((a & 8) >> 1) + 
       ((a & 4) << 1) + ((a & 2) >> 0) + ((a & 1) << 4)))


lip = [0, 5, 3, 2, 4, 1]
n = int(input())
a = []
for i in range(6):
    a.append(n%2)
    n //= 2
a.reverse()
b = [0]*6
for i in range(6):
    b[lip[i]] = a[i]
ans = 0
k = 1
#print(a)
#print(b)
for i in range(6):
    ans += k*b[-i - 1]
    k *= 2
print(ans)


ans=0
a=[4, 1, 3, 2, 0, 5]
x=int(input())
for i in range(6):
    if(x & (1 << i)):
        ans += (1<<a[i])
print(ans)

num=int(input())
add=0
if(num%32<16):
  if(num%2==1):
    add+=15
else:
  if(num%2==0):
    add-=15
if(num%16<8):
  if(num%8>=4):
    add+=4
else:
  if(num%8<4):
    add-=4
num+=add
print(num)


n = int(input())
n = list(bin(n)[2:])
n = (6-len(n))*["0"]+n 
n_t = n.copy()
n[1] = n_t[5]
n[2] = n_t[3]
n[3] = n_t[2]
n[4] = n_t[4]
n[5] = n_t[1]
print(int(''.join(n),2))

idx = [0, 5, 3, 2, 4, 1]
n = int(input())
b = bin(n)[2:]
b = '0'*(6 - len(b)) + b
output_str = ''.join([b[i] for i in idx])
print(int(output_str, 2))


a=bin(int(input()))[2:]
a='0'*(6-len(a))+a
a=list(a)
a[0],a[1],a[2],a[3],a[4],a[5]=a[0],a[5],a[3],a[2],a[4],a[1]
print(int(''.join(a),2))

a = int(input(''))
b = bin(a)[2:]
b = '0'*(6-len(b))+b
ans = b[0]+b[5]+b[3]+b[2]+b[4]+b[1]
print(int('0b'+ans,2))

T = int(input())
bit = []
arr = [4,1,3,2,0,5]
s = 0
for i in range(6):
	if T % 2 == 0:
		T = T // 2
		bit.append(0)
	else:
		T = T // 2
		bit.append(1)
		s += 2**arr.index(i)
print(s)


N = int(input())
b = []
for i in range(6):
    N, r = divmod(N, 2)
    b.append(r)
ans = 0
if b[0]: 
    ans += 16
if b[1]:
    ans += 2
if b[2]:
    ans += 8
if b[3]:
    ans += 4
if b[4]:
    ans += 1
if b[5]:
    ans += 32
print(ans)

a = int(input())
mult = [32, 1, 4, 8, 2, 16]

out = 0
for i, c in enumerate(format(a, '#08b')[2:]):
    if c == '1':
        out += mult[i]
        
print(out)

s = bin(int(input()))[2:].zfill(6)
print(int(s[0]+s[5]+s[3]+s[2]+s[4]+s[1],2))


'''from math import sqrt, ceil
a = int(input())
for i in range(2, ceil(sqrt(a)) + 1):
    if a % i == 0:
        print(i, end='')
        print(a//i)
'''


a = int(input())
s = [1, 2, 4, 8, 16, 32]
s1 = ''
s2 = ''
for i in s[::-1]:
    if a - i >= 0:
        a -= i
        s1 += '1'
    else:
        s1 += '0'
s2 = s1[0]
s2 += s1[5]
s2 += s1[3]
s2 += s1[2]
s2 += s1[4]
s2 += s1[1]
b = 0
for i in range(6):
    b += int(s2[5 - i]) * s[i]

print(b)

seq = bin(int(input()))[2:].rjust(6, '0')
print(int(seq[0] + seq[5] + seq[3] + seq[2] + seq[4] + seq[1], 2))

s = bin(int(input()))[2:]
s = '0' * (7 - len(s)) + s
res = list('0' * 7)

a = [0, 1, 6, 4, 3, 5, 2]
for i in range(7):
    res[i] = s[a[i]]

print(int(''.join(res), 2))

x = int(input())
x = bin(x)[2:]
x = list(x)
x = ["0"]*(6-len(x)) + x
temp = 	x[5]
x[5] = x[1]
x[1] = temp
temp = x[2]
x[2] = x[3]
x[3] = temp
x = ''.join(x)
print(int(x,2))



a=bin(int(input()))[2:]
a=(6-len(a))*'0'+a
b=a[0]+a[5]+a[3]+a[2]+a[4]+a[1]
print(int(b,2))

a = int(input())

bin_a = bin(a)[2:]
bin_a = (6 - len(bin_a)) * '0' + bin_a

result = bin_a[0] + bin_a[5] + bin_a[3] + bin_a[2] + bin_a[4] + bin_a[1]
print(int(result, 2))

#!/usr/bin/env python3

a = int(input())
a = list(format(a, '#08b')[2:])
map = [0, 5, 3, 2, 4, 1]
a = [a[map[i]] for i in range(6)]
a = ''.join(a)
print(int(a, 2))


number = int(input())
replacement = [16, 2, 8, 4, 1, 32]
result = 0
for k in range(6):
    if number % 2 == 1:
        result += replacement[k]
        number -= 1
    number /= 2
print(result)

a=int(input())
abin=format(a,'06b')

l=[abin[0],abin[5],abin[3],abin[2],abin[4],abin[1]]
x=''.join(l)
print(int(x,2))

n=int(input())
a=list(bin(n)[2:])
a=['0']*(6-len(a))+a
a[1],a[5]=a[5],a[1]
a[2],a[3]=a[3],a[2]
#print("".join(a))
print(int("".join(a),2))

p = [0, 5, 3, 2, 4, 1]
# p = [0, 3, 5, 2, 4, 1]
s = bin(int(input()))[2:].zfill(6)
print(int("".join([s[x] for x in p]), 2))


p = { 0: 4, 1: 1, 2: 3, 3: 2, 4: 0, 5: 5 }
n = int(input())
res = 0
for i in range(6):
    if (n & (1 << i)):
        res |= (1 << p[i])
print(res)

x=bin(int(input()))[2:]

x="0"*(6-len(x))+x
x1=list(x)
temp=x1[1]
x1[1]=x1[5]
x1[5]=temp
temp=x1[2]
x1[2]=x1[3]
x1[3]=temp
x2="".join(x1)
print(int(x2,2))

n = int(input())
s = bin(n)[2:]
rem = 6-len(s)
s="0"*rem+s
ans = [0]*6
ans[0]=s[0]
ans[1]=s[5]
ans[2]=s[3]
ans[3]=s[2]
ans[4]=s[4]
ans[5]=s[1]
an = "".join(ans)
print(int(an,2))

'''
2 = 2^1
24 = 2^3*3^1
50 = 2^1*5^2

2 = 10
5 = 101, 24 = 11000
35 = 100011, 50 = 110010

And after happily lived ever they
and they lived happily ever after

123456
164352

2 = 000010
2 = 000010

 5 = 000101
24 = 011000

35 = 100011
50 = 110010
'''

replacement = [4, 1, 3, 2, 0, 5] + list(range(6, 64))
n = list('{:064b}'.format(int(input())))
n.reverse()

ans = list(n)
for i in range(64):
    ans[i] = n[replacement[i]]
ans.reverse()
print(int(''.join(ans), 2))


a = int(input())
a = bin(a)[2:]
a = "0" * (6 - len(a)) + a
p = [0, 5, 3, 2, 4, 1]
b = ['-'] * 6
for i in range(6):
  b[i] = a[p[i]]
b = "".join(b)
print(int(b, 2))


n = bin(int(input()))[2:].rjust(6, "0")
print(int(n[0] + n[5] + n[3] + n[2] + n[4] + n[1], 2))

n = int(input())
b = f'{n:b}'

while len(b)<6:
    b = "0" + b

s = b[0]+b[5]+b[3]+b[2]+b[4]+b[1]

print(int(s,2))

import sys
import atexit
import io
from collections import defaultdict, Counter

def main():
    i = bin(int(input()))[2:]
    i =  ('0'*(6 - len(i))) + i
    i = ''.join(list(map(lambda x: i[x], [0,5,3,2,4,1])))
    print(int(i,2))

def __starting_point():
    main()
__starting_point()

x=int(input())
A=[]
for i in range(1,7):
    A.append(x//pow(2,7-i))
    x=x%pow(2,7-i)
A.append(x%2)
#print(A)

new=A[1]*pow(2,5)+A[6]*pow(2,4)+A[4]*pow(2,3)+A[3]*pow(2,2)+A[5]*pow(2,1)+A[2]
print(new)






d = list("And after happily lived ever they".split())
n = bin(int(input()))[2:]
n = "0" * (6 - len(n)) + n
m = n[0] + n[5] + n[3] + n[2] + n[4] + n[1]
print(int('0b'+m, 2))

x = int(input())

r = [4, 1, 3, 2, 0, 5]

ans = 0
for i in range(6):
    if x & (1 << i):
        ans |= (1 << r[i])

print(ans)

b = bin(int(input()))[2:]
b=b[::-1]
val = [0 for i in range(6)]
for c in range(len(b)):
	val[5-c]=b[c]
# print(val)
# val=val[::-1]
# print(val)
l=[0,5,3,2,4,1]
ans = [0 for i in range(6)]
for c in range(6):
	ans[c]=val[l[c]]
print(int(''.join(map(str,ans)),2))

n=int(input())
b=''
n = "{0:b}".format(n)
if len(n)!=7:
    n = '0'*(7-len(n))+n

b+=n[0]+n[1]+n[6]+n[4]+n[3]+n[5]+n[2]

print(int(b,2))


def to_bin(a):
    out = []
    while a >0:
        if a%2==1:out.append(1)
        else:out.append(0)
        a//=2
    while len(out)<6:
        out.append(0)
    return out
def to_dec(a):
    c = 1
    out = 0
    for i in a:
        out += i*c
        c*=2
    return out
a = int(input())
b = to_bin(a)
c =[]
c.append(b[4])
c.append(b[1])
c.append(b[3])
c.append(b[2])
c.append(b[0])
c.append(b[5])
print(to_dec(c))

n = int(input())
n = bin(n)[2:]
n = "0"*(6-len(n))+n

s = n[0] + n[5] + n[3] + n[2] + n[4] + n[1]
print(int(s,2))

n = int(input())
me = [4, 1, 3, 2, 0, 5]
#0 3 5 2 4 1
#4 1 3 0 2 5
#0 5 3 1 4 2
#3 1 4 2 0 5
ans = 0
for _ in range(6):
    if (n % 2 == 1):
        ans += (2 ** me[_])
    n //= 2
print(ans)


s = bin(int(input()))[2:].zfill(6)
l = []
for i in [0, 5, 3, 2, 4, 1]:
    l.append(s[i])
print(int(''.join(l), 2))

n = int(input())
a = (n >> 5) & 1
b = (n >> 4) & 1
c = (n >> 3) & 1
d = (n >> 2) & 1
e = (n >> 1) & 1
f = n & 1
print(((((a*2+f)*2+d)*2+c)*2+e)*2+b)


n = bin(int(input()))[2:].rjust(6, '0')
s = n[0] + n[5] + n[3] + n[2] + n[4] + n[1]
print(int(s, 2))

# Python3 code to check if k-th bit 
# of a given number is set or not 

def isKthBitSet(n, k): 
	if n & (1 << (k - 1)): 
		return True
	else: 
		return False

x=int(input())
ans=0
if(isKthBitSet(x,6)):ans+=2**5
if(isKthBitSet(x,5)):ans+=2**0
if(isKthBitSet(x,4)):ans+=2**2
if(isKthBitSet(x,3)):ans+=2**3
if(isKthBitSet(x,2)):ans+=2**1
if(isKthBitSet(x,1)):ans+=2**4
print(ans)

n = int(input())
n = bin(n)[2:]
while len(n) < 6:
	n = '0' + n

res = list(n)

res[1], res[5] = res[5] , res[1]
res[2], res[3] = res[3], res[2]


print(int(''.join(res),2))


map = {0:0, 1:5, 2:3, 3:2, 4:4, 5:1}
s = "{:>06b}".format(int(input()))
s2 = [""]*6
for i in range(6):
	s2[map[i]]=s[i]
print(int("".join(s2), 2))