n,K = map(int,input().split()) a = list(map(int,input().split())) dp = [[0]*(101) for i in range(2)] dp[0][0] = 1 mod = 10**9+7 for i in range(n): ndp = [[0]*(100*(i+2)+1) for x in range(i+2)] for j in range(i+1): x = a[i] for k in range(100*(i+1)+1): if dp[j][k] > 0: ndp[j+1][k+x] += dp[j][k] ndp[j+1][k+x] %= mod ndp[j][k] += dp[j][k] ndp[j][k] %= mod dp = ndp ans = 0 for i in range(1,n+1): for j in range(100*n+1): if i*K <= j: ans += dp[i][j] ans %= mod print(ans)