#include <bits/stdc++.h>
using namespace std;
const long du = int(1e9) + 7;
long n, k[105], k1, d[int(1e6) + 5];
long long b[105][105], a[105][105], res[105][105];
void nhan() {
  long long ans[105][105];
  for (long i = 0; i <= 100; i++)
    for (long j = 0; j <= 100; j++) {
      ans[i][j] = 0;
      for (long p = 0; p <= 100; p++)
        ans[i][j] = (ans[i][j] + res[i][p] * res[p][j]) % du;
    }
  for (long i = 0; i <= 100; i++)
    for (long j = 0; j <= 100; j++) res[i][j] = ans[i][j];
}
void nhan1() {
  long long ans[105][105];
  for (long i = 0; i <= 100; i++)
    for (long j = 0; j <= 100; j++) {
      ans[i][j] = 0;
      for (long p = 0; p <= 100; p++)
        ans[i][j] = (ans[i][j] + res[i][p] * a[p][j]) % du;
    }
  for (long i = 0; i <= 100; i++)
    for (long j = 0; j <= 100; j++) res[i][j] = ans[i][j];
}
void mu(long n) {
  if (n == 1) return;
  mu(n / 2);
  nhan();
  if (n % 2) nhan1();
}
void nhand() {
  long long ans[105][105];
  for (long i = 0; i <= 100; i++)
    for (long j = 0; j <= 100; j++) {
      ans[i][j] = 0;
      for (long p = 0; p <= 100; p++)
        ans[i][j] = (ans[i][j] + res[i][p] * b[p][j]) % du;
    }
  for (long i = 0; i <= 100; i++)
    for (long j = 0; j <= 100; j++) res[i][j] = ans[i][j];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cin >> n >> k1;
  for (long i = 1; i <= n; i++) cin >> d[i];
  k[0] = 1;
  for (long i = 1; i <= n; i++) k[d[i]]++;
  for (long i = 0; i <= 100; i++)
    for (long j = 0; j <= 100; j++) res[i][j] = a[i][j] = 0;
  for (long i = 0; i <= 100; i++) res[0][i] = a[0][i] = k[i];
  k[0] = 0;
  for (long i = 0; i <= 100; i++) res[1][i] = a[1][i] = k[i];
  for (long i = 1; i <= 99; i++) res[i + 1][i] = a[i + 1][i] = 1;
  for (long i = -1; i <= 99; i++)
    if (i <= 0)
      b[i + 1][0] = 1;
    else
      b[i + 1][0] = 0;
  if (k1 == 0)
    cout << 1;
  else {
    mu(k1);
    nhand();
    cout << res[0][0];
  }
}
