You will be given a sequence consists of many numbers, your task is to calculate the length of the longest consecutive subsequence , the sum of which can be divided by another given number.

Input
There are multiple test cases.
The first line of each case contains two integer N and M, (0< N <= 100000, 0 < M < 10000),then followed by a line consists of N integers a1,a2,...an,
( -100000000 <= a1,a2,...an <= 100000000 ).

Output
For each test case,Output the length of the longest consecutive subsequence , the sum of which can be divided by M.

Sample Input

2 3
1 6
3 3
2 3 6
2 5
1 3

Sample Output

1
2
0