print((eval(input().replace(' ','*'))))
st = input().strip().split()

a = int(st[0])

b = int(float(st[1])*1000)

print((a*b//1000))
print((eval(input().replace(" ", "*"))))

st = input().strip().split()
a = int(st[0])
b = int(float(st[1]) * 1000)
print((a * b // 1000))

-print((eval(input().replace(" ", "*")))) +st = input().strip().split() +a = int(st[0]) +b = int(float(st[1]) * 1000) +print((a * b // 1000))