import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int n = Integer.parseInt(sa[0]); int k = Integer.parseInt(sa[1]); sa = br.readLine().split(" "); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = Integer.parseInt(sa[i]); } br.close(); int mod = 1000000007; int[][][] dp = new int[n + 1][n + 1][10001]; dp[0][0][0] = 1; for (int i = 0; i < n; i++) { int i1 = i + 1; for (int j = 0; j <= i; j++) { for (int j2 = 0; j2 <= 100 * i; j2++) { dp[i1][j][j2] += dp[i][j][j2]; dp[i1][j][j2] %= mod; dp[i1][j + 1][j2 + a[i]] += dp[i][j][j2]; dp[i1][j + 1][j2 + a[i]] %= mod; } } } long ans = 0; for (int j = 1; j <= n; j++) { for (int j2 = j * k; j2 <= 10000; j2++) { ans += dp[n][j][j2]; } } ans %= mod; System.out.println(ans); } }