You are given an array of
Compute the maximum number of modifications you can perform on the array until you can no longer perform any modifications.
Constraints
In tests worth 5 marks, the sum of all
Input Specification
The first line contains a single integer,
Each of the next
Output Specification
Print, on a single line, the maximum number of modifications that can be performed.
Sample Input 1
Copy
3
1
2
1
Sample Output 1
Copy
2
Sample Input 2
Copy
5
1
2
1
10
3
Sample Output 2
Copy
7
Comments