#K39442. Minimum Total Bonus

    ID: 26421 Type: Default 1000ms 256MiB

Minimum Total Bonus

Minimum Total Bonus

A company wishes to distribute bonuses to its employees based on their performance scores. The bonus rule is simple: the total bonus amount is equal to the number of distinct scores among the employees.

For example, if there are 4 employees with scores [10, 20, 20, 10], then there are only 2 distinct scores (10 and 20), so the total bonus amount is 2.

Your task is to compute the minimum total bonus amount given the number of employees and their respective scores.

In mathematical terms, if we denote the scores as \(s_1, s_2, \ldots, s_n\), then the result is:

\[ \text{result} = \left|\{ s_1, s_2, \ldots, s_n \}\right| \]

inputFormat

The input is read from stdin and consists of two lines:

  1. The first line contains an integer \(n\) -- the number of employees.
  2. The second line contains \(n\) space-separated integers representing the performance scores of the employees.

outputFormat

Output the minimum total bonus amount (i.e., the number of distinct scores) to stdout.

## sample
4
10 20 20 10
2

</p>