import java.io.*; import java.util.*; public class Main { static int[] values; static int[][][] dp; static int k; static final int MOD = 1000000007; public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int n = sc.nextInt(); k = sc.nextInt(); values = new int[n]; for (int i = 0; i < n; i++) { values[i] = sc.nextInt(); } dp = new int[n][n + 1][10001]; for (int[][] arr1 : dp) { for (int[] arr2 : arr1) { Arrays.fill(arr2, -1); } } System.out.println(dfw(n - 1, 0, 0)); } static int dfw(int idx, int count, int v) { if (idx < 0) { if (count > 0 && count * k <= v) { return 1; } else { return 0; } } if (dp[idx][count][v] < 0) { dp[idx][count][v] = (dfw(idx - 1, count, v) + dfw(idx - 1, count + 1, v + values[idx])) % MOD; } return dp[idx][count][v]; } } class Scanner { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(""); public Scanner() throws Exception { } public int nextInt() throws Exception { return Integer.parseInt(next()); } public long nextLong() throws Exception { return Long.parseLong(next()); } public double nextDouble() throws Exception { return Double.parseDouble(next()); } public String next() throws Exception { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } }