def main(): n = int(input()) list_a = [int(i) for i in input().split(" ")] counts = {} for a in list_a: counts[a] = counts.get(a, 0) + 1 ans_count = 0 for count in counts.values(): if count == 1: ans_count += 1 print(ans_count) if __name__ == "__main__": main()