Yasmar Nodrog is baking cookies to share between himself and his friend Larry the magical panda! Over the past few days, Yasmar baked
First he will select
batches of cookies to share with Larry. Then he will divide the cookies evenly between himself and Larry and remove all of the cookies from the chosen batches. Note that both Yasmar and Larry have extremely high standards and will only accept full cookies, meaning that it must be possible to divide the cookies in the chosen batches evenly.
Help Yasmar find the maximum number of times he can repeat this procedure!
Constraints
Subtask 1 [25%]
Subtask 2 [25%]
Subtask 3 [25%]
Subtask 4 [25%]
No additional constraints.
Input Specification
The first line of input will consist of a single integer
The next and final line of input will contain
Output Specification
Output a single integer representing the maximum number of times Yamsar can repeat the procedure.
Sample Input 1
8
1 2 3 4 5 6 7 11
Sample Output 1
3
Explanation for Sample Output 1
A possible ordering of length
Sample Input 2
4
1 2 3 4
Sample Output 2
2
Comments