Question
Lucky Train Compartments

A train conductor marks each compartment with a passenger mood score. A group of consecutive compartments is called lucky if the total mood score is divisible by K. Count how many lucky groups exist.

The twist: scores may be negative, so remainder handling must be careful.

Input

The first line contains KaTeX can only parse string typed expression. For each test case, the first line contains KaTeX can only parse string typed expression and KaTeX can only parse string typed expression. The second line contains KaTeX can only parse string typed expression integers.

Output

For each test case, print the number of lucky subarrays. Print the output of each test-case in different lines.

Example
Example 1:
Input
1

5 5
4 5 0 -2 -3
Output
6


Example 2:
Input
1

4 3
3 1 2 6
Output
6

Online