444. Kartik Bhaiya and the Signum Function

0

Easy

During a mathematics lesson, Kartik Bhaiya introduced his students to the signum(x) function, defined as follows:
  • 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.
Om, a computer science student, decided to solve a coding problem based on the signum function. The problem is as follows: Given an array of N integers, find the value of signum(P), where P is the product of all the elements of 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 of the array.

Example

Input

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

Output

1

Constraints

1<=N<=10005
-109<=A[i] <= 109
Loading...

View Submissions

Console