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

a = int(a)

b = int(b * 100 + 0.5)

ans = a * b // 100

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

a = int(a)

b = int(b * 1000)

ans = a * b // 1000

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

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

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