#include <bits/stdc++.h>
using namespace std;
unsigned long long mod = 1e9 + 7;
unsigned long long cont[205], dp[205];
unsigned long long mat[205][205], temp[205][205], arr[205][205], ans[205][205];
void expo(unsigned long long p, unsigned long long n) {
  unsigned long long i, j, k;
  if (!p) {
    for (i = 0; i <= n; i++)
      for (j = 0; j <= n; j++) arr[i][j] = (i == j);
    return;
  }
  if (p & 1) {
    expo(p - 1, n);
    for (i = 0; i <= n; i++) {
      for (j = 0; j <= n; j++) {
        temp[i][j] = 0;
        for (k = 0; k <= n; k++) {
          temp[i][j] += (mat[i][k] * arr[k][j]) % mod;
          temp[i][j] %= mod;
        }
      }
    }
    for (i = 0; i <= n; i++)
      for (j = 0; j <= n; j++) arr[i][j] = temp[i][j];
  } else {
    expo(p / 2, n);
    for (i = 0; i <= n; i++) {
      for (j = 0; j <= n; j++) {
        temp[i][j] = 0;
        for (k = 0; k <= n; k++) {
          temp[i][j] += (arr[i][k] * arr[k][j]) % mod;
          temp[i][j] %= mod;
        }
      }
    }
    for (i = 0; i <= n; i++)
      for (j = 0; j <= n; j++) arr[i][j] = temp[i][j];
  }
}
int main() {
  unsigned long long i, j, k, s, d, r, m, n, p, q;
  cin >> n >> m;
  for (i = 1; i <= n; i++) cin >> r, cont[r]++;
  n = 100;
  for (i = 1; i <= n; i++) {
    dp[i] = cont[i];
    for (j = 1; j < i; j++) {
      dp[i] += (cont[j] * dp[i - j]) % mod;
      dp[i] %= mod;
    }
  }
  if (m <= n) {
    s = 1;
    for (i = 1; i <= m; i++) s = (s + dp[i]) % mod;
    cout << s << endl;
    return 0;
  }
  for (i = 0, s = 0; i < n; i++) s = (s + dp[i]) % mod;
  for (i = 1, ans[1][0] = s; i <= n; i++) ans[1][i] = dp[n - i + 1];
  mat[0][0] = 1, mat[1][0] = 1;
  for (i = 1; i <= n; i++) mat[i][1] = cont[i];
  for (i = 2; i <= n; i++) mat[i - 1][i] = 1;
  expo(m - n + 1, n);
  for (i = 1; i <= 1; i++) {
    for (j = 0; j <= n; j++) {
      temp[i][j] = 0;
      for (k = 0; k <= n; k++) {
        temp[i][j] += (ans[i][k] * arr[k][j]) % mod;
        temp[i][j] %= mod;
      }
    }
  }
  cout << (temp[1][0] + 1) % mod << endl;
}
