from decimal import *



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

ans = int(A * B)

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

aa = int(A)

b_100 = int(round(100 * B))



seki = aa * b_100

ans = seki // 100



# ans=math.floor(aa*b_100/100)



# ab = Decimal(A) * Decimal(B)

# ans = math.floor(ab)



print(ans)
from decimal import *

A, B = list(map(Decimal, input().split()))
ans = int(A * B)
print(ans)

A, B = list(map(float, input().split()))
aa = int(A)
b_100 = int(round(100 * B))
seki = aa * b_100
ans = seki // 100
# ans=math.floor(aa*b_100/100)
# ab = Decimal(A) * Decimal(B)
# ans = math.floor(ab)
print(ans)

-from decimal import * - -A, B = list(map(Decimal, input().split())) -ans = int(A * B) +A, B = list(map(float, input().split())) +aa = int(A) +b_100 = int(round(100 * B)) +seki = aa * b_100 +ans = seki // 100 +# ans=math.floor(aa*b_100/100) +# ab = Decimal(A) * Decimal(B) +# ans = math.floor(ab)