#K77652. Count Unique Attendees

    ID: 34912 Type: Default 1000ms 256MiB

Count Unique Attendees

Count Unique Attendees

You are given a list of employee IDs corresponding to invitations sent for an event. Some employees might have received more than one invitation. Your task is to count the number of unique employees that will attend the event.

Mathematically, if \(A\) is an array of employee IDs, then the number of unique employees is given by \(|\{ a : a \in A \}|\).

For example, if the invitations are sent to employees with IDs [1, 2, 2, 3, 4], then the answer is 4.

inputFormat

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

  • The first line contains an integer \(M\), representing the number of invitations sent.
  • The second line contains \(M\) space-separated integers representing the employee IDs.

If \(M = 0\), the second line will be empty.

outputFormat

Output a single integer to stdout: the number of unique employee IDs.

## sample
5
1 2 2 3 4
4