import functools
import operator
print(functools.reduce(operator.mul,[int(input()) for i in range(10)]))
import functools
import operator
print(functools.reduce(operator.mul,[int(input()) for i in range(10)]))