N = int(raw_input()) input = sorted(map(int, raw_input().strip().split())) cnt = 0 for i in sorted(set(input)): input = input[input.index(i):] if input.count(i) == 1: cnt += 1 print cnt