from decimal import Decimal

import math



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

a=int(a)

b=Decimal(b)

x = math.floor(a*b)

print((int(x)))
a,b=list(map(str,input().split()))

a=int(a)

b=int(float(b)*1000)

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

a, b = list(map(str, input().split()))
a = int(a)
b = Decimal(b)
x = math.floor(a * b)
print((int(x)))

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

-from decimal import Decimal -import math - -b = Decimal(b) -x = math.floor(a * b) -print((int(x))) +b = int(float(b) * 1000) +print((a * b // 1000))