N, K = map(int, input().split()) A = list(map(int, input().split())) mod = 10**9+7 dp = [[[0]*10001 for _ in range(N+1)] for _ in range(N+1)] dp[0][0][0] = 1 res = 0 for i in range(1, N+1): for j in range(N+1): for k in range(10001): dp[i][j][k] += dp[i-1][j][k] dp[i][j][k] %= mod if j > 0 and k+A[i-1] <= 10000: dp[i][j][k+A[i-1]] += dp[i-1][j-1][k] dp[i][j][k+A[i-1]] %= mod if i == N and j > 0 and k >= j*K: res += dp[i][j][k] res %= mod print(res)