We are given an array on integers, where is the number of numbers equal with . A scenario where the humanity is victorious is a scenario where the sum of the numbers from the subset is multiple of .
For example, if and the numbers from the array are , and , the array is .
Even though a number shows up multiple times in the resulting array, the subsets formed by those numbers are different.
With other words, we can count the elements from the array with , , ..., , and we have to find how many subsets among the have the sum a multiple of .
Since the number of subsets can be quite large, we need to print its number modulo .
Input
On the first line we have one integer, (). On the next line we have the integers ().
For tests worth 20 points, .
For other tests worth 40 points, .
Output
On the first line the required answer should be printed.
Example 1
stdin
3
1 1 1
stdout
4
Explanation
The correct subsets are , , and .
Example 2
stdin
5
69 420 1017 128 953
stdout
985611225