Kyriakos Grizzly is once again hosting a party in celebration of finally hitting a OAC (one-arm chin-up)! To celebrate he has lined up platters of food with the platter containing servings of delicious protein! To host a party Kyriakos will first choose a continuous subsection of platters of length and invite of his friends to help him finish the food. Of course since everyone loves protein, Kyriakos will only consider choosing a party with people if and only if the total number of servings of protein can be split equally among all the partygoers. This way no one can complain that another person ate more protein than them. Help Kyriakos determine how many different parties he can host!
Constraints
Subtask 1 [30%]
Subtask 2 [70%]
No additional constraints.
Input Specification
The first line of input will consist of a single integer . The second and final line of input will contain spaced out integers with the one denoting the number of servings of protein on the platter.
Output Specification
Output a single integer, the number of different parties Kyriakos can choose from.
Sample Input
4
6 9 4 20
Sample Output
6
Explanation
The valid parties that Kyriakos can choose are , , , , , and . There are possibilities.
Comments