A,B = list(map(str,input().split()))

a = int(A)

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

ans = (a*b)//100

print(ans)
A,B = list(map(float,input().split()))

a = int(A)

b = int(B*100+0.5)

ans = (a*b)//100

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

A, B = list(map(float, input().split()))
a = int(A)
b = int(B * 100 + 0.5)
ans = (a * b) // 100
print(ans)

-A, B = list(map(str, input().split())) +A, B = list(map(float, input().split())) -b = int(B.replace(".", "")) +b = int(B * 100 + 0.5)