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

b = b * 1000

b = int(b)

c = int(a)*b//1000

print(c)

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

b = b * 100 + 0.1

b = int(b)

c = int(a)*b//100

print(c)

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

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

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