a,b=input().split()

a = int(a)

b1,b2 = b.split('.')

ans = a*(int(b1)*100+int(b2))//100

print(ans)

a,b = input().split()

a = int(a)

b = int(100*float(b)+0.5)

print(((a*b)//100))

a, b = input().split()
a = int(a)
b1, b2 = b.split(".")
ans = a * (int(b1) * 100 + int(b2)) // 100
print(ans)

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

-b1, b2 = b.split(".") -ans = a * (int(b1) * 100 + int(b2)) // 100 -print(ans) +b = int(100 * float(b) + 0.5) +print(((a * b) // 100))