def main(): n = int(input()) a = input().split() ans = 0 for i in set(a): if a.count(i) == 1: ans += 1 print(ans) if __name__ == '__main__': main()