def main(): N = int(input()) nums = [int(i) for i in input().split()] print(get_new_num_count(nums)) def get_new_num_count(values): sorted_values = sorted(values) first_loop = True duplicate = [] for value in sorted_values: if first_loop: prev = value first_loop = False continue if prev == value: duplicate.append(prev) prev = value #print("values", values) #print("duplicate", duplicate) return len(set(values)) - len(set(duplicate)) if __name__ == '__main__': main()