import itertools lgt = int(input()) dat = list(map(int, input().split())) cnt = 0 for i in itertools.combinations(dat, 2): if i[0] == i[1]: cnt += 2 print(lgt-cnt)