#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &item) {
  out << '(' << item.first << ", " << item.second << ')';
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &v) {
  for (const auto &item : v) out << item << ' ';
  return out;
}
const int N = 100010;
const int D = 100;
const int MOD = 1000000007;
template <int N, class T = int>
struct Matrix {
  T a[N][N];
  Matrix() { memset(a, 0, sizeof a); }
  static Matrix identity() {
    Matrix<N> res;
    for (int i = 0; i < N; ++i) res.a[i][i] = 1;
    return res;
  }
  friend Matrix operator*(const Matrix &a, const Matrix &b) {
    Matrix<N> c;
    for (int i = 0; i < N; ++i)
      for (int j = 0; j < N; ++j)
        for (int k = 0; k < N; ++k)
          c.a[i][j] = (c.a[i][j] + 1LL * a.a[i][k] * b.a[k][j]) % MOD;
    return c;
  }
  friend Matrix pw(Matrix base, int exp) {
    Matrix<N> res = identity();
    for (; exp; exp >>= 1) {
      if (exp & 1) res = res * base;
      base = base * base;
    }
    return res;
  }
};
void add(int &x, int y) {
  if ((x += y) >= MOD) x -= MOD;
}
int d[N], dp[D];
int main() {
  ios_base::sync_with_stdio(false);
  int n, x;
  cin >> n >> x;
  for (int i = 1; i <= n; ++i) cin >> d[i];
  dp[0] = 1;
  for (int i = 1; i < D; ++i) {
    dp[i] = 1;
    for (int j = 1; j <= n; ++j)
      if (i - d[j] >= 0) add(dp[i], dp[i - d[j]]);
  }
  if (x < D) return cout << dp[x] << '\n', 0;
  Matrix<D + 1> m;
  m.a[0][0] = 1;
  for (int i = 1; i < D; ++i) m.a[i + 1][i] = 1;
  m.a[0][D] = 1;
  for (int i = 1; i <= n; ++i) ++m.a[D + 1 - d[i]][D];
  m = pw(m, x - D + 1);
  int ans = m.a[0][D];
  for (int i = 0; i < D; ++i) {
    ans = (ans + 1LL * dp[i] * m.a[i + 1][D]) % MOD;
  }
  cout << ans << '\n';
  return 0;
}
