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