#include <bits/stdc++.h>
using namespace std;
void Read(int &n) {
  int sign = 1;
  n = 0;
  char c;
  do {
    c = getchar();
  } while (!isdigit(c) && c != '-');
  if (c == '-') {
    c = getchar();
    sign = -1;
  }
  do {
    n = n * 10 + c - 48;
    c = getchar();
  } while (isdigit(c));
  n *= sign;
}
void Read(long long &n) {
  int sign = 1;
  n = 0;
  char c;
  do {
    c = getchar();
  } while (!isdigit(c) && c != '-');
  if (c == '-') {
    c = getchar();
    sign = -1;
  }
  do {
    n = n * 10ll + c - 48;
    c = getchar();
  } while (isdigit(c));
  n *= sign;
}
void Write(int n) {
  if (n == 0) {
    putchar('0');
    return;
  } else if (n < 0)
    putchar('-'), n = -n;
  char C[30];
  int d = 0;
  while (n) {
    C[++d] = (n % 10) + 48;
    n /= 10;
  }
  for (int i = d; i >= 1; --i) putchar(C[i]);
}
void Write(long long n) {
  if (n == 0) {
    putchar('0');
    return;
  } else if (n < 0)
    putchar('-'), n = -n;
  char C[30];
  int d = 0;
  while (n) {
    C[++d] = (n % 10ll) + 48;
    n /= 10ll;
  }
  for (int i = d; i >= 1; --i) putchar(C[i]);
}
const int maxn = 1e5 + 10;
const int BASE = 1e9 + 7;
const int maxM = 110;
long long cnt[maxn], dp[maxM], S[maxM], d[maxM];
int n, x;
struct Matrix {
  long long a[maxM][maxM];
  void Clear() { memset(a, 0, sizeof a); }
  void Init() {
    memset(a, 0, sizeof a);
    a[0][0] = a[0][1] = 1;
    for (int i = 1; i <= 100; ++i) a[1][i] = cnt[i];
    for (int i = 2; i <= 100; ++i) a[i][i - 1] = 1;
  }
  Matrix operator*(const Matrix &that) const {
    Matrix C;
    C.Clear();
    for (int i = 0; i <= 100; ++i)
      for (int j = 0; j <= 100; ++j) {
        for (int k = 0; k <= 100; ++k)
          C.a[i][j] = (C.a[i][j] + a[i][k] * that.a[k][j]) % BASE;
      }
    return C;
  }
};
Matrix Pow(long long p) {
  Matrix ans, a;
  ans.Init();
  a.Init();
  --p;
  while (p) {
    if (p & 1) ans = ans * a;
    a = a * a;
    p >>= 1;
  }
  return ans;
}
int main() {
  scanf("%d%d", &n, &x);
  for (int i = 1; i <= n; ++i) {
    int v;
    scanf("%d", &v);
    ++cnt[v];
  }
  dp[0] = 1;
  for (int i = 1; i <= 110; ++i)
    for (int j = 1; i - j >= 0; ++j)
      dp[i] = (dp[i] + cnt[j] * dp[i - j]) % BASE;
  S[0] = 1;
  for (int i = 1; i <= 110; ++i) S[i] = (S[i - 1] + dp[i]) % BASE;
  if (x <= 100) {
    printf("%I64d", S[x]);
    return 0;
  }
  Matrix ans = Pow(x - 98);
  d[0] = S[98];
  for (int i = 1; i <= 100; ++i) d[i] = dp[100 - i];
  long long answ = 0;
  for (int i = 0; i <= 100; ++i) answ = (answ + d[i] * ans.a[0][i]) % BASE;
  printf("%I64d", answ);
  return 0;
}
