Alternating Sequences
0
Given an array a of N integers a_{1}, a_{2}, a_{3}, … a_{N} you have to find the longest alternating subsequence of this array .
An alternating sequence b_{1}, b_{2} … b_{k}, k>=1 is a sequence that has the 2 following properties:

b_{1} < b_{2} < b_{3} <…..< b_{k}  The signs alternate between adjacent elements, i.e, if b_{1} > 0 then b_{2}<0, b_{3} >0 and so on. Alternatively, if b_{1}<0, then b_{2}>0, b_{3}<0 and so on.
A sub sequence of array a is a sequence obtained by dropping some elements of the array a.
Here is the formal definition.
It is guaranteed that the array a contains no element equal to 0.
Input:
The first line contains a single integer N, denoting the size of the array.
The next line contains N integers , denoting the array a.
Output:
Print a single integer  the length of the longest alternating subsequence.
Constraints:
1<=N<=5000
a_{i}<=10^{9}, a_{i} not equal to 0