n=int(input())
for i in range (n):
b=1
num=input()
for j in range (len(num)):
b *= int(num[j])
print(b)