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

a=int(a)

b=int(b*1000)

print(((a*b)//1000))
from decimal import Decimal

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

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

from decimal import Decimal

a, b = list(map(Decimal, input().split()))
print((int(a * b)))

-a, b = list(map(float, input().split())) -a = int(a) -b = int(b * 1000) -print(((a * b) // 1000)) +from decimal import Decimal + +a, b = list(map(Decimal, input().split())) +print((int(a * b)))