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

b = float(b)*1000

b = int(b)

c = int(a)*b//1000



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

b = float(b)*1000

b = int(b)

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



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

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

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