n = int(input()) nums = list(map(int, input().split())) li = [] count = 0 for i in nums: if not i in li: count += 1 li.append(i) elif not count <= 0: count -= 1 print(count)