def main(): N = int(input()) A = input() A = list(map(int, A.split())) l = [] for c in A: if A.count(c) == 1: l.append(c) print(len(l)) if __name__ == "__main__": main()