from decimal import Decimal, ROUND_FLOOR



A, B = input().split()

A = int(A)

B = Decimal(B)

ans = Decimal(str(A*B)).quantize(Decimal('0'), rounding=ROUND_FLOOR)



print(ans)
A, B = input().split()

A = int(A)

B = int(float(B)*1000)

ans = A*B//1000

print(ans)
from decimal import Decimal, ROUND_FLOOR

A, B = input().split()
A = int(A)
B = Decimal(B)
ans = Decimal(str(A * B)).quantize(Decimal("0"), rounding=ROUND_FLOOR)
print(ans)

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

-from decimal import Decimal, ROUND_FLOOR - -B = Decimal(B) -ans = Decimal(str(A * B)).quantize(Decimal("0"), rounding=ROUND_FLOOR) +B = int(float(B) * 1000) +ans = A * B // 1000