class Problem0182: def solve(this): n = int(input()) a = list(map(int, input().split())) res = {} for d in a: res[d] = res.get(d, 0) + 1 cnt = 0 for d in res.values(): if d == 1: cnt += 1 print(cnt) if __name__ == "__main__": problem = Problem0182() problem.solve()