A, B = input().strip().split()

a = int(A)

b = int(float(B) * 1000)



ans = (a * b) // 1000

print(ans)

A, B = input().strip().split()

a = int(A)

b = int(B.replace(".", ""))

ans = (a * b) // 100

print(ans)

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

A, B = input().strip().split()
a = int(A)
b = int(B.replace(".", ""))
ans = (a * b) // 100
print(ans)

-b = int(float(B) * 1000) -ans = (a * b) // 1000 +b = int(B.replace(".", "")) +ans = (a * b) // 100