- Time limit: 1.00 s
- Memory limit: 512 MB
You are given an array of integers. Your task is to count the number of non-empty subsets of the given array with average equal to .
Input
The first line has two integers and : the size of the array and the target average.
The next line has integers : the contents of the array.
Output
Print one integer: the number of non-empty subsets with average equal to , modulo .
Constraints
Example
Input:
5 2 1 1 2 3 4
Output:
7