import sys def input(): return sys.stdin.readline().rstrip('\n') from collections import Counter def main(): input() c = Counter(map(int, input().split())) print(sum(1 for k, v in c.items() if v == 1)) if __name__ == '__main__': main()