a, b = list(map(float, input().split()))

print((int(a)*int(b*1000)//1000))

a, b = list(map(float, input().split()))

a = int(a)

b = int(float(b)*1000)

r = int((a*b)//1000)

print(r)

a, b = list(map(float, input().split()))
print((int(a) * int(b * 1000) // 1000))

a, b = list(map(float, input().split()))
a = int(a)
b = int(float(b) * 1000)
r = int((a * b) // 1000)
print(r)

-print((int(a) * int(b * 1000) // 1000)) +a = int(a) +b = int(float(b) * 1000) +r = int((a * b) // 1000) +print(r)