837. Kartik Bhaiya and the Signum Function

0

Easy

During a mathematics class, Kartik Bhaiya introduced the signum(x) function to his students. The function is defined as follows:

Given an array of N integers, find the value of signum(P), where P is the product of all the elements in the array.

- signum(x) equals 1 if x is positive.
- signum(x) equals -1 if x is negative.
- signum(x) equals 0 if x is equal to zero.

Given an array of N integers, find the value of signum(P), where P is the product of all the elements in the array.

Input Format

The first line contains an integer N, which represents the size of the array. The second line contains N space-separated integers that represent the elements of the array.

Output Format

Print signum(P), where P is the product of all the elements in the array.

Example

Input

7
-1 -2 -3 -4 2 1 3

Output

1

Constraints

1<=N<=10005

-10

-10

^{9}<=A[i] <= 10^{9}Loading...

View Submissions

Console