Problems
Absolute distinct count
Absolute distinct count
Given a sorted array of integers. Find the number of distinct absolute values among the elements of the array.
Input data
First line contains number of integers n (n ≤ 2 * 10^6
). Second line contains n integer, sorted in increasing order. Array can contain duplicates values.
Output data
Print the number of distinct absolute values.
Examples
Input example #1
6 -3 -2 0 3 4 5
Output example #1
5
Input example #2
9 -1 -1 -1 -1 0 1 1 1 1
Output example #2
2
Input example #3
4 5 5 5 5
Output example #3
1