Nastya owns too many arrays now, so she wants to delete the least important of them. However, she discovered that this array is magic! Nastya now knows that the array has the following properties:

  In one second we can add an arbitrary (possibly negative) integer to all elements of the array that are not equal to zero.  When all elements of the array become equal to zero, the array explodes. 

Nastya is always busy, so she wants to explode the array as fast as possible. Compute the minimum time in which the array can be exploded.


-----Input-----

The first line contains a single integer n (1 ≤ n ≤ 10^5) — the size of the array.

The second line contains n integers a_1, a_2, ..., a_{n} ( - 10^5 ≤ a_{i} ≤ 10^5) — the elements of the array.


-----Output-----

Print a single integer — the minimum number of seconds needed to make all elements of the array equal to zero.


-----Examples-----
Input
5
1 1 1 1 1

Output
1

Input
3
2 0 -1

Output
2

Input
4
5 -6 -5 1

Output
4



-----Note-----

In the first example you can add  - 1 to all non-zero elements in one second and make them equal to zero.

In the second example you can add  - 2 on the first second, then the array becomes equal to [0, 0,  - 3]. On the second second you can add 3 to the third (the only non-zero) element.

Difficulty: interview

Starter code:

Solutions:
n = int(input())
a = set(map(int, input().split()))
if 0 in a: a.remove(0)
print(len(a))

input()
x = set([int(i) for i in input().split() if i != '0'])

print(len(x))

n = int(input())
s = set()
a = list(map(int, input().split()))
for el in a:
    if (el != 0):
        s.add(el)
print(len(s))

n = int(input())
a = [int(v) for v in input().split()]

print(len(set(a) - {0}))

n = int(input())
a = list(map(int, input().split()))
d = set()
s = 0
for x in a:
    if x == 0 or x in d:
        continue
    s += 1
    d.add(x)
print(len(d))


n = int(input())

arr = list(map(int, input().split()))
print(len(set(arr)) - (int(0 in arr)))


n = int(input())
num = list(map(int, input().split()))
a = []
for i in range(n):
    if num[i]:
        a.append(num[i])
print(len(set(a)))

def read_nums():
    return [int(x) for x in input().split()]


def main():
    n = read_nums()
    nums = read_nums()
    s = set([x for x in nums if x != 0])
    print(len(s))


def __starting_point():
    main()

__starting_point()

n = int(input())
a = set(list(map(int,input().split())))
if 0 in a:
    a.remove(0)
print(len(a))


n = input()
a = list(map(int, input().split()))

b = set(a)
b.add(0)
b.remove(0)

print(len(b))

n = int(input())
spisok = list(map(int, input().split()))
if 0 in spisok:
    print(len(set(spisok)) - 1)
else:
    print(len(set(spisok)))

#
n = int(input())
from collections import Counter
a = Counter(list(map(int,input().split())))
if 0 in a:
	print (len(a)-1)
else:
	print (len(a))

n = int(input())

d = set()

data = list(map(int, input().split()))

ans = 0
for el in data:
    if el != 0:
        if not el in d:
            d.add(el)
            ans+=1

print(ans)


n = int(input())
a = set(map(int, input().split()))
if 0 in a:
    print(len(a) - 1)
else:
    print(len(a))


n = int(input())
a = set(list(map(int, input().split())))
ans = len(a)
if 0 in a:
    ans -= 1
print(ans)


input()
s = set(map(int, input().split()))
ans = len(s)
if 0 in s:
    ans -= 1
print(ans)


n = int(input())
a = list(map(int, input().split()))
print(len(set(a) - {0}))


n = int(input())
a = list(map(int,input().split()))
s = set()
for i in a:
    if not(i==0):
        s.add(i)
print(len(s))


input()
A = set(map(int,input().split()))
A.discard(0)
print(len(A))


#JMD
#Nagendra Jha-4096
 
#a=list(map(int,sys.stdin.readline().split(' ')))
#n,k,s= map(int, sys.stdin.readline().split(' '))
 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
t=int(input())
a=list(map(int,sys.stdin.readline().split(' ')))
s=set(a)
ans=len(s)
if(0 in s):
	ans-=1
print(ans)
	
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

n = int(input())
s = list(map(int, input().split()))
s = set(s)
count = 0
for x in s:
    if x!=0:
        count+=1

print(count)

#     Codeforces Round #489 (Div. 2)
import collections
from functools import cmp_to_key
#key=cmp_to_key(lambda x,y: 1 if x not in y else -1 )

import sys
def getIntList():
    return list(map(int, input().split()))    

import bisect 
            
    
 
n,  = getIntList()

z = getIntList()

res = set()
for x in z:
    if x !=0:
        res.add(x)
    
print(len(res))


n=int(input())
a=set(map(int,input().split()))
a-={0}
print(len(a))


n = int(input())

xs = set(int(x) for x in input().split() if int(x))

print(len(xs))

n = int(input())
ai = list(map(int,input().split()))
ai.sort()
last_el = ai[0]
ans  = 0
if ai[0] != 0:
    ans = 1
for i in range(1,n):
    if last_el != ai[i] and ai[i] != 0:
        ans += 1
    last_el = ai[i]
print(ans)