A, B = list(map(float, input().split()))

A = int(A)

B = int(B * 1000)



ans = A * B // 1000



print(ans)
A, B = input().split()

A = int(A)

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

print((A * B // 100))
A, B = list(map(float, input().split()))
A = int(A)
B = int(B * 1000)
ans = A * B // 1000
print(ans)

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

-A, B = list(map(float, input().split())) +A, B = input().split() -B = int(B * 1000) -ans = A * B // 1000 -print(ans) +B = int(B.replace(".", "")) +print((A * B // 100))