#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e2 + 1;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
long long dp[maxN], cnt[maxN];
struct Matrix {
  long long A[maxN][maxN];
  int n, m;
  Matrix(int a, int b) {
    n = a;
    m = b;
    memset(A, 0, sizeof A);
  }
  long long* operator[](int i) { return A[i]; }
  Matrix operator*(Matrix& B) {
    Matrix R(n, B.m);
    for (int i = 0; i < n; i++)
      for (int k = 0; k < m; k++)
        for (int j = 0; j < B.m; j++)
          R[i][j] = (R[i][j] + (1ll * A[i][k] * B[k][j]) % MOD) % MOD;
    return R;
  }
  Matrix operator^(long long pw) {
    Matrix T = *this;
    Matrix R(n, m);
    for (int i = 0; i < n; i++) R[i][i] = 1;
    long long tmp = pw;
    while (tmp) {
      if (tmp & 1) R = R * T;
      T = T * T;
      tmp >>= 1;
    }
    return R;
  }
};
int main() {
  time_t START = clock();
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, x;
  scanf("%d%d", &n, &x);
  for (int i = 0; i < n; i++) {
    int inp;
    scanf("%d", &inp);
    cnt[inp]++;
  }
  dp[0] = dp[maxN - 1] = 1;
  for (int i = 1; i <= min(x, maxN - 2); i++) {
    for (int j = 1; j <= i; j++) {
      dp[i] = (dp[i] + (cnt[j] * dp[i - j]) % MOD) % MOD;
    }
    dp[maxN - 1] = (dp[maxN - 1] + dp[i]) % MOD;
  }
  if (x < maxN - 1) return printf("%lld\n", dp[maxN - 1]), 0;
  Matrix M(maxN, maxN);
  for (int i = 0; i < maxN - 1; i++) M[i + 1][i] = 1;
  for (int i = 0; i < maxN; i++)
    M[i][maxN - 2] = M[i][maxN - 1] = cnt[maxN - 1 - i];
  M[maxN - 1][maxN - 1] = 1;
  M = M ^ (x - maxN + 2);
  long long sum = 0;
  for (int i = 0; i < maxN; i++) {
    sum = (sum + (dp[i] * M[i][maxN - 1]) % MOD) % MOD;
  }
  printf("%lld\n", sum);
  time_t FINISH = clock();
  cerr << "Execution time: "
       << (long double)(FINISH - START) / CLOCKS_PER_SEC * 1000.0
       << " milliseconds.\n";
  return 0;
}
