#include using namespace std; typedef long long ll; const ll mod = pow(10, 9) + 7; const int l = 2 * 100 * 100 + 1; const int m = 100 * 100; ll dp[101][l]{}; int main() { int N, K; cin >> N >> K; ll A[N]; for (int i = 0; i < N; i++) { cin >> A[i]; A[i] -= K; } dp[0][m] = 1; for (int i = 0; i < N; i++) { for (int j = 0; j + A[i] < l; j++) { dp[i + 1][j] += dp[i][j]; dp[i + 1][j] %= mod; dp[i + 1][j + A[i]] += dp[i][j]; dp[i + 1][j + A[i]] %= mod; } } ll s = 0; for (int i = m; i < l; i++) { s += dp[N][i]; s %= mod; } cout << s - 1<< "\n"; return 0; }