#C1863. Distinct Buildings Count

    ID: 45115 Type: Default 1000ms 256MiB

Distinct Buildings Count

Distinct Buildings Count

In this problem, you are given a list of non-negative integers representing the heights of buildings. Your task is to determine the number of distinct building heights. Mathematically, if the list of heights is denoted as ( h_1, h_2, \dots, h_n ) and ( S ) is the set of unique heights, then the answer is (|S|) (the cardinality of ( S )).

The input is given via standard input, and you must output the result to standard output.

inputFormat

The first line contains an integer ( n ) representing the number of buildings. The second line contains ( n ) space-separated non-negative integers representing the heights of the buildings.

outputFormat

Output a single integer representing the number of distinct building heights.## sample

6
1 2 2 3 4 1
4