a, b = list(map(float, input().split()))

a = int(a)

b = int(b * 1000)



print((a*b//1000))

a, b = list(map(float, input().split()))

a = int(a)

b = int(b * 100 + 0.5)



print((a*b//100))

a, b = list(map(float, input().split()))
a = int(a)
b = int(b * 1000)
print((a * b // 1000))

a, b = list(map(float, input().split()))
a = int(a)
b = int(b * 100 + 0.5)
print((a * b // 100))

-b = int(b * 1000) -print((a * b // 1000)) +b = int(b * 100 + 0.5) +print((a * b // 100))