a = eval(input())
b = ''
for i in a:
    b = b + str(i)
print(int(b, 2))

85b71702f5aae95bc534788732af86821307c363
<mask token>

<mask token>
for i in a:
    b = b + str(i)
print(int(b, 2))

a = eval(input())
b = ''
for i in a:
    b = b + str(i)
print(int(b, 2))
