#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int NMAX = 102;
int dp[NMAX], a[NMAX], fr[NMAX];
class Matrix {
 public:
  vector<vector<int> > A;
  Matrix() {
    A.resize(101);
    for (int i = 1; i <= 100; ++i) {
      A[i].resize(101);
      for (int j = 1; j <= 100; ++j) A[i][j] = 0;
    }
  }
  friend inline Matrix operator+(Matrix A, Matrix B) {
    Matrix C;
    for (int i = 1; i <= 100; ++i)
      for (int j = 1; j <= 100; ++j) C.A[i][j] = (A.A[i][j] + B.A[i][j]) % MOD;
    return C;
  }
  friend inline Matrix operator*(Matrix A, Matrix B) {
    Matrix C;
    for (int i = 1; i <= 100; ++i)
      for (int j = 1; j <= 100; ++j)
        for (int k = 1; k <= 100; ++k)
          C.A[i][j] = (1LL * C.A[i][j] + 1LL * A.A[i][k] * B.A[k][j]) % MOD;
    return C;
  }
};
Matrix A;
inline pair<Matrix, Matrix> Pow(int k) {
  if (k == 1) return make_pair(A, A);
  if (k & 1) {
    pair<Matrix, Matrix> P = Pow(k - 1);
    P.second = P.second * A;
    P.first = P.first + P.second;
    return P;
  }
  pair<Matrix, Matrix> P = Pow(k / 2);
  Matrix Aux = (P.first * P.second);
  P.first = P.first + Aux;
  P.second = P.second * P.second;
  return P;
}
int main() {
  int sum = 0, n, x;
  cin.sync_with_stdio(false);
  cin >> n >> x;
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    ++fr[x];
    A.A[100 - x + 1][100]++;
  }
  dp[0] = 1;
  for (int i = 1; i <= 100; ++i)
    for (int j = 1; j <= i; ++j)
      dp[i] = (1LL * dp[i] + 1LL * fr[j] * dp[i - j]) % MOD;
  if (x <= 100) {
    for (int i = 0; i <= x; ++i) sum = (sum + dp[i]) % MOD;
    cout << sum << "\n";
    return 0;
  }
  for (int i = 1; i <= 99; ++i) A.A[i + 1][i] = 1;
  pair<Matrix, Matrix> B = Pow(x - 100);
  sum = 1;
  for (int i = 1; i <= 100; ++i) {
    sum = (sum + 1LL * dp[i] * B.first.A[i][100]) % MOD;
    sum = (sum + dp[i]) % MOD;
  }
  cout << sum << "\n";
  return 0;
}
