N, A, B = list(map(int, input().split()))

print((min(N * A, B)))
n, a, b = list(map(int, input().split()))

ans = min(n * a, b)

print(ans)
N, A, B = list(map(int, input().split()))
print((min(N * A, B)))

n, a, b = list(map(int, input().split()))
ans = min(n * a, b)
print(ans)

-N, A, B = list(map(int, input().split())) -print((min(N * A, B))) +n, a, b = list(map(int, input().split())) +ans = min(n * a, b) +print(ans)