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!
Subtask 1 [30%]
Subtask 2 [70%]
No additional constraints.
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 a single integer, the number of different parties Kyriakos can choose from.
4 6 9 4 20
The valid parties that Kyriakos can choose are , , , , , and . There are possibilities.