Yasmar Nodrog is baking cookies to share between himself and his friend Larry the magical panda! Over the past few days, Yasmar baked batches of cookies, with the -th batch consisting of cookies. Yasmar, being the good friend he is, will always share his cookies fairly with Larry. More specifically, Yasmar will repeat the following process until he cannot repeat it anymore:
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 space-separated integers, denoting the number of cookies in each batch.
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 is , where means that you choose the cookie batches with cookies and cookies. It can be proven that you cannot perform the operation more than times.
Sample Input 2
4
1 2 3 4
Sample Output 2
2
Comments