from decimal import *



s,t =input().split()

a = int(s)

b = int(float(t)*1000)

ans = Decimal(0)

for si in s:

    ai = int(si)

    ans = ans * 10 + ai*b

print((ans//1000))

s,t =input().split()

a = int(s)

b = int(float(t)*1000)

ans = a*b

print((ans//1000))

from decimal import *

s, t = input().split()
a = int(s)
b = int(float(t) * 1000)
ans = Decimal(0)
for si in s:
    ai = int(si)
    ans = ans * 10 + ai * b
print((ans // 1000))

s, t = input().split()
a = int(s)
b = int(float(t) * 1000)
ans = a * b
print((ans // 1000))

-from decimal import * - -ans = Decimal(0) -for si in s: -    ai = int(si) -    ans = ans * 10 + ai * b +ans = a * b