import collections N,K = map(int,input().split()) A = list(map(int,input().split())) mod = 10**9+7 DP = [collections.defaultdict(int) for _ in range(N+1)] DP[0][0]=1 for a in A: for i in reversed(range(N)): for k,v in DP[i].items(): DP[i+1][k+a] = (DP[i+1][k+a]+v) % mod ans = 0 for i in range(1,N+1): for k,v in DP[i].items(): if k>=K*i: ans+=v print(ans%mod)