ab = input().split()



A = int(ab[0])

B = int(float(ab[1]) * 100 + .5)



A *= B

print((A // 100))
ab = input().split()



A = int(ab[0])

B = int(ab[1].split(".")[0])

C = int(ab[1].split(".")[1])

print((A * B + (A * C) // 100))
ab = input().split()
A = int(ab[0])
B = int(float(ab[1]) * 100 + 0.5)
A *= B
print((A // 100))

ab = input().split()
A = int(ab[0])
B = int(ab[1].split(".")[0])
C = int(ab[1].split(".")[1])
print((A * B + (A * C) // 100))

-B = int(float(ab[1]) * 100 + 0.5) -A *= B -print((A // 100)) +B = int(ab[1].split(".")[0]) +C = int(ab[1].split(".")[1]) +print((A * B + (A * C) // 100))