#include using namespace std; using ll = long long int; using lc = complex; int main(void) { constexpr ll MOD = 1e9+7; constexpr double PI = acos(-1); cout << fixed << setprecision(32); cin.tie(0); ios::sync_with_stdio(false); ll n, k; cin >> n >> k; vector a(n); for(auto &e: a) cin >> e, e -= k; vector dp(30000); dp[15000] = 1; for(ll i=0; i dq = dp; for(ll j=30000-1; j>=0; j--) { if(j-a[i]>=0) (dp[j] += dq[j-a[i]]) %= MOD; } } ll r = 0; for(ll i=15000; i<30000; i++) r += dp[i]; cout << r-1 << endl; }