a, b = input().split()



a = int(a)

b = int(float(b)*1000)



print(((a*b)//1000))
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) * 1000)
print(((a * b) // 1000))

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

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