#C10502. Product of Positive Integers

    ID: 39715 Type: Default 1000ms 256MiB

Product of Positive Integers

Product of Positive Integers

You are given a list of integers \(a_1, a_2, \dots, a_n\). Your task is to compute the product of all positive integers in the list. Formally, compute:

[ P = \prod_{\substack{1 \le i \le n \ a_i > 0}} a_i ]

If there are no positive integers in the list, then \(P = 1\). The input will be read from standard input and the result should be printed to standard output.

inputFormat

The input consists of two lines. The first line contains a single integer \(n\) denoting the number of elements in the list. The second line contains \(n\) space-separated integers \(a_1, a_2, \dots, a_n\).

outputFormat

Output a single integer which is the product of all positive integers in the list. If there are no positive integers, output 1.

## sample
4
-1 2 -3 4
8