a,b=input().split()

a=int(a)

b=int(float(b)*1000)

print((int(a*b//1000)))
A,B=input().split()

a=int(A)

b=""

p=0

for i in range(len(B)):

    if B[i]==".":

        p=i

        break

    b+=B[i]

b=int(b)*100+int(B[p+1:p+3])

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

A, B = input().split()
a = int(A)
b = ""
p = 0
for i in range(len(B)):
    if B[i] == ".":
        p = i
        break
    b += B[i]
b = int(b) * 100 + int(B[p + 1 : p + 3])
print((a * b // 100))

-a, b = input().split() -a = int(a) -b = int(float(b) * 1000) -print((int(a * b // 1000))) +A, B = input().split() +a = int(A) +b = "" +p = 0 +for i in range(len(B)): +    if B[i] == ".": +        p = i +        break +    b += B[i] +b = int(b) * 100 + int(B[p + 1 : p + 3]) +print((a * b // 100))