#include <bits/stdc++.h>
using namespace std;
const uint32_t MAX = 100;
const uint32_t MOD = 1e9 + 7;
struct matrix {
  uint32_t a[MAX + 1][MAX + 1];
} r, base, p;
uint32_t cnt[MAX + 1], f[MAX + 1];
matrix operator*(const matrix& x, const matrix& y) {
  matrix r;
  for (uint32_t i = 0; i <= MAX; ++i)
    for (uint32_t j = 0; j <= MAX; ++j) {
      uint32_t v = 0;
      for (uint32_t k = 0; k <= MAX; ++k) {
        v = (v + uint64_t(x.a[i][k]) * y.a[k][j]) % MOD;
      }
      r.a[i][j] = v;
    }
  return r;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  uint32_t n, k;
  cin >> n >> k;
  for (uint32_t i = 1; i <= n; ++i) {
    uint32_t d;
    cin >> d;
    ++cnt[d];
  }
  for (uint32_t i = 0; i <= MAX; ++i) {
    f[i] = 1;
    for (uint32_t j = 1; j <= i; ++j)
      f[i] = (f[i] + uint64_t(f[i - j]) * cnt[j]) % MOD;
  }
  if (k <= MAX) {
    cout << f[k] << '\n';
  } else {
    k = k - MAX;
    for (uint32_t i = 0; i < MAX; ++i) {
      base.a[i][0] = f[MAX - i];
    }
    base.a[MAX][0] = 1;
    for (uint32_t i = 0; i < MAX; ++i) {
      p.a[0][i] = cnt[i + 1];
    }
    p.a[0][MAX] = p.a[MAX][MAX] = 1;
    for (uint32_t i = 1; i < MAX; ++i) {
      p.a[i][i - 1] = 1;
    }
    for (uint32_t i = 0; i <= MAX; ++i) {
      r.a[i][i] = 1;
    }
    while (k) {
      if (k & 1) r = r * p;
      k >>= 1;
      p = p * p;
    }
    r = r * base;
    cout << r.a[0][0];
  }
}
