n = int(input())
m = sorted(map(int,input().split()))
v = 0
for i in range(n):
    if m[i-1]!=m[i-2] and m[i-1]!=m[i]:
        v += 1
print(v)