#K65057. Maximum Unique Elements

    ID: 32112 Type: Default 1000ms 256MiB

Maximum Unique Elements

Maximum Unique Elements

You are given an array of n integers. You are allowed to perform an arbitrary number of operations. In each operation, you may take any element from the array and increment it by 1. The goal is to maximize the number of distinct elements in the array. You need to determine the maximum number of unique elements that can be obtained.

Observation: No matter how many increments you perform, the maximum number of distinct elements you can achieve is exactly n (the size of the array). This is because duplicates can always be adjusted to reach a new value not present in the array. Formally, if n is the number of elements, then the maximum number of distinct elements is:

Answer=n\text{Answer} = n

inputFormat

The input is read from stdin and contains two lines. The first line contains a single integer n which denotes the number of elements in the array. The second line contains n space-separated integers representing the array elements.

outputFormat

Output a single integer to stdout — the maximum number of unique elements that can be obtained after performing the operations.

## sample
3
1 2 3
3