N = int(input()) listA = [int(i) for i in input().split()] listA.sort() count = 0 for i in range(len(listA)): if i == 0: if listA[i] != listA[(i+1)]: count += 1 elif i == len(listA)-1: if listA[(i-1)] != listA[i]: count += 1 else: if listA[(i-1)] != listA[i] and listA[i] != listA[(i+1)]: count += 1 print(count)