s,t =input().split()

a = int(s)

b = int(float(t)*1000)

ans = a*b

print((ans//1000))

#import math

#from decimal import *

#getcontext().prec = 28

a,b=input().split()

#a_ = Decimal(a)

#b_ = Decimal(b)

a = int(a)

b = int(float(b)*1000)

#print(round(Decimal(Decimal(a)*Decimal(b))))

ans = a*b

print((ans//1000))

#print(math.floor(Decimal(a)*Decimal(b)/Decimal(100.0)))
s, t = input().split()
a = int(s)
b = int(float(t) * 1000)
ans = a * b
print((ans // 1000))

# import math
# from decimal import *
# getcontext().prec = 28
a, b = input().split()
# a_ = Decimal(a)
# b_ = Decimal(b)
a = int(a)
b = int(float(b) * 1000)
# print(round(Decimal(Decimal(a)*Decimal(b))))
ans = a * b
print((ans // 1000))
# print(math.floor(Decimal(a)*Decimal(b)/Decimal(100.0)))

-s, t = input().split() -a = int(s) -b = int(float(t) * 1000) +# import math +# from decimal import * +# getcontext().prec = 28 +a, b = input().split() +# a_ = Decimal(a) +# b_ = Decimal(b) +a = int(a) +b = int(float(b) * 1000) +# print(round(Decimal(Decimal(a)*Decimal(b)))) +# print(math.floor(Decimal(a)*Decimal(b)/Decimal(100.0)))