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

b,c=list(map(str,b.split(".")))

a=int(a)

b=int(b)

c=int(c)

print((a*b+a*c//100))
a,b=list(map(int,input().replace(".","").split()))

print((a*b//100))
a, b = list(map(str, input().split(" ")))
b, c = list(map(str, b.split(".")))
a = int(a)
b = int(b)
c = int(c)
print((a * b + a * c // 100))

a, b = list(map(int, input().replace(".", "").split()))
print((a * b // 100))

-a, b = list(map(str, input().split(" "))) -b, c = list(map(str, b.split("."))) -a = int(a) -b = int(b) -c = int(c) -print((a * b + a * c // 100)) +a, b = list(map(int, input().replace(".", "").split())) +print((a * b // 100))