#include using namespace std; typedef pair P; int INF = 5e18+7; int mod = 1e9+7; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; long double pi = 3.141592653589793238; int dp[110][110][10010]; int main() { int N,K; cin >> N >> K; dp[0][0][0] = 1; for(int i = 0; i < N; i++) { int A; cin >> A; for(int j = 0; j <= i; j++) { for(int k = 0; k <= 10000; k++) { dp[i+1][j][k] += dp[i][j][k]; dp[i+1][j][k] %= mod; if(k+A <= 10000) { dp[i+1][j+1][k+A] += dp[i][j][k]; dp[i+1][j+1][k+A] %= mod; } } } } int ans = 0; for(int i = 1; i <= N; i++) { for(int j = K*i; j <= 10000; j++) { ans += dp[N][i][j]; ans %= mod; } } cout << ans << endl; }