#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) repr(i, 0, n) #define INF 2e9 #define MOD 1000000007 //#define MOD 998244353 #define LINF (long long)4e18 #define jck 3.141592 const double EPS = 1e-10; using ll = long long; using Pi = pair; using Pl = pair; ll dp[110][21000]; int main(){ int n,k; cin >> n >> k; vector a(n); rep(i,n){ cin >> a[i]; a[i] -= k; } dp[0][10000] = 1; rep(i,n)rep(j,20001){ 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 ans = 0; repr(i,10000,21000){ ans += dp[n][i]; ans %= MOD; } ans--; cout << ans << endl; }