N, M = list(map(int, input().split()))

print((N*M))
a,b = list(map(float,input().split()))

a = int(a)

b = int(b*1000)

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

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

-N, M = list(map(int, input().split())) -print((N * M)) +a, b = list(map(float, input().split())) +a = int(a) +b = int(b * 1000) +print((int(a * b) // 1000))