#include <bits/stdc++.h>
using namespace std;
vector<vector<long long> > matmul(const vector<vector<long long> > &a,
                                  const vector<vector<long long> > &b,
                                  long long M = 1000000007) {
  int n = a.size(), m = a[0].size(), l = b[0].size();
  assert(m == b.size());
  vector<vector<long long> > c(n, vector<long long>(l, 0));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < l; j++) {
      for (int k = 0; k < m; k++) {
        c[i][j] = (c[i][j] + a[i][k] * b[k][j]) % M;
      }
    }
  }
  return c;
}
vector<vector<long long> > matpow(vector<vector<long long> > a, long long p,
                                  long long M = 1000000007) {
  assert(a.size() == a[0].size());
  int n = a.size();
  vector<vector<long long> > res(n, vector<long long>(n, 0));
  for (int i = 0; i < n; i++) {
    res[i][i] = 1;
  }
  while (p > 0) {
    if (p & 1) res = matmul(res, a, M);
    a = matmul(a, a, M);
    p >>= 1;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, x, t, m, y, z, k;
  cin >> n >> k;
  if (k == 0) {
    cout << 1 << '\n';
    return 0;
  }
  vector<long long> a;
  for (int e = 0; e < n; e++) {
    long long y;
    cin >> y;
    a.push_back(y);
  };
  vector<vector<long long> > foo(101, vector<long long>(1));
  for (int i = 0; i < 101; i++) {
    foo[i][0] = 1;
    for (int j = 0; j < n; j++) {
      if (i - a[j] >= 0) {
        foo[i][0] += foo[i - a[j]][0];
        foo[i][0] %= 1000000007;
      }
    }
  }
  vector<vector<long long> > mat(101, vector<long long>(101));
  mat[0][0] = 1;
  for (int i = 1; i < 100; i++) {
    mat[i][i + 1]++;
  }
  mat[100][0] = 1;
  for (int j = 0; j < n; j++) {
    mat[100][100 + 1 - a[j]]++;
  }
  vector<vector<long long> > f = matpow(mat, k - 1);
  foo = matmul(f, foo);
  if (foo[1][0] < 0) foo[1][0] += 1000000007;
  cout << foo[1][0];
  return 0;
}
