a, b = input(). split()

a = int(a)

b = int(float(b)*100+0.5)

print((a*b//100))
a, b = input(). split()

a = int(a)

b = int(float(b)*100+0.1)

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

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

-b = int(float(b) * 100 + 0.5) +b = int(float(b) * 100 + 0.1)