from collections import Counter def main(): input() A = list(map(int, input().split())) A_counter = Counter(A) print(len(list(filter(lambda count_: count_ == 1, A_counter.values())))) if __name__ == "__main__": main()