function main(input) {
    var args = input.split('\n');
    var A = args[1].split(' ').map((n) => parseInt(n, 10));
    const reducer = (accumulator, currentValue) => accumulator * currentValue;
    console.log(A.reduce(reducer))
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));