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



c = int(a)*int(float(b) * 1000)//1000



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

b = float(b)



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



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

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

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