A,B=input().split()

A=int(A)

B=int(B.replace(".",""))*100

print((A*B//10000))

A,B=input().split()

A=int(A)

B=int(B.replace(".",""))

print((A*B//100))

A, B = input().split()
A = int(A)
B = int(B.replace(".", "")) * 100
print((A * B // 10000))

A, B = input().split()
A = int(A)
B = int(B.replace(".", ""))
print((A * B // 100))

-B = int(B.replace(".", "")) * 100 -print((A * B // 10000)) +B = int(B.replace(".", "")) +print((A * B // 100))