#include <bits/stdc++.h>
using namespace std;
inline int Pow(int x, int y, int mod) {
  long long t = x, r = 1;
  for (; y; y >>= 1, t = t * t % mod) y & 1 ? r = r * t % mod : 0;
  return r;
}
inline int Get() {
  int res = 0, q = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') q = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') res = res * 10 + ch - '0', ch = getchar();
  return res * q;
}
const double eps = 1e-12, pi = M_PI;
const int oo = (int)2.1e9, mod = (int)1e9 + 7;
const long long INF = (long long)1e17;
int n, m, d, k;
int v[100010], f[110];
struct mat {
  int r[102][102];
  mat() {
    for (int i = (1), end = (d); i <= end; ++i)
      for (int j = (1), end = (d); j <= end; ++j) r[i][j] = 0;
  }
} A, I;
mat operator*(const mat &a, const mat &b) {
  mat D;
  for (int i = (1), end = (d); i <= end; ++i) {
    for (int j = (1), end = (d); j <= end; ++j) {
      for (int k = (1), end = (d); k <= end; ++k) {
        (D.r[i][j] += (long long)a.r[i][k] * (long long)b.r[k][j] % mod) %= mod;
      }
    }
  }
  return D;
}
mat operator^(const mat &a, int b) {
  mat T = a, Res = I;
  for (; b; b >>= 1, T = T * T)
    if (b & 1) Res = Res * T;
  return Res;
}
int main() {
  scanf(
      "%d"
      "%d"
      "\n",
      &n, &m);
  for (int i = (1), end = (n); i <= end; ++i)
    scanf("%d", &k), ++v[k], d = max(d, k);
  ++d, f[0] = 1;
  for (int i = (1), end = (d - 1); i <= end; ++i) {
    A.r[d - i][d - 1] = v[i], f[i] = 1;
    for (int j = (1), end = (i); j <= end; ++j)
      (f[i] += (long long)f[i - j] * (long long)v[j] % mod) %= mod;
    if (i + 1 < d) A.r[i + 1][i] = 1;
  }
  for (int i = (1), end = (d); i <= end; ++i) I.r[i][i] = 1;
  A.r[d][d - 1] = A.r[d][d] = 1;
  if (m < d)
    return printf(
               "%d"
               "\n",
               f[m]),
           0;
  A = A ^ (m - d + 1);
  int ans = 0;
  for (int i = (1), end = (d - 1); i <= end; ++i)
    (ans += (long long)f[i] * (long long)A.r[i][d - 1] % mod) %= mod;
  (ans += A.r[d][d - 1]) %= mod;
  printf(
      "%d"
      "\n",
      ans);
  return 0;
}
