#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
constexpr int MAX = 256;
constexpr int MOD = 1000000007;
template <typename T>
struct Polynomial {
  T v[MAX];
  int sz;
  static int mod;
  Polynomial() : sz(0) {}
  Polynomial(int n, const T &x = 0) : sz(n) { fill(v, v + n, x); }
  static void setMod(int p) { mod = p; }
  int size() const { return sz; }
  void resize(int n) { sz = n; }
  T &operator[](int k) { return v[k]; }
  const T &operator[](int k) const { return v[k]; }
  Polynomial operator*(const Polynomial &o) const {
    Polynomial ret(sz + o.sz - 1);
    int i, j;
    for (i = 0; i < sz; ++i) {
      if (!v[i]) continue;
      for (j = 0; j < o.sz; ++j) {
        ret.v[i + j] += v[i] * o.v[j];
        if (~mod) ret.v[i + j] %= mod;
      }
    }
    return ret;
  }
  Polynomial operator%(const Polynomial &o) const {
    Polynomial ret = *this;
    int i, j, n = o.size() - 1;
    for (i = sz - 1; i >= n; --i) {
      if (!ret.v[i]) continue;
      for (j = 1; j <= n; ++j) {
        ret.v[i - j] -= ret.v[i] * o.v[n - j];
        if (~mod && (ret.v[i - j] %= mod) < 0) ret.v[i - j] += mod;
      }
    }
    ret.sz = min(ret.sz, n);
    return ret;
  }
  Polynomial pow(i64 n, const Polynomial &p) const {
    Polynomial ret(1, 1), a = *this;
    for (; n; n >>= 1) {
      if (n & 1) ret = (ret * a) % p;
      a = (a * a) % p;
    }
    return ret;
  }
};
template <typename T>
int Polynomial<T>::mod = MOD;
int cnt[MAX];
i64 val[MAX], sum[MAX];
i64 solve(int n, int x) {
  val[0] = 1;
  sum[0] = 1;
  if (!x) return 1;
  int m = 0;
  for (int i = 1; i < MAX; ++i) {
    if (cnt[i]) m = i;
  }
  for (int i = 1; i <= m; ++i) {
    val[i] = 0;
    for (int j = 1; j <= i && j <= m; ++j) {
      val[i] = (val[i] + (i64)cnt[j] * val[i - j]) % MOD;
    }
    sum[i] = (sum[i - 1] + val[i]) % MOD;
    if (i == x) return sum[i];
  }
  Polynomial<i64> p = {2};
  p[0] = MOD - 1;
  p[1] = 1;
  Polynomial<i64> q = {m + 1};
  for (int i = 0; i < m; ++i) q[i] = MOD - cnt[m - i];
  q[m] = 1;
  p = p * q;
  Polynomial<i64> a{2};
  a[0] = 0;
  a[1] = 1;
  a = a.pow(x, p);
  i64 ret = 0;
  for (int i = 0; i < a.size(); ++i) {
    ret = (ret + sum[i] * a[i] % MOD) % MOD;
  }
  return ret;
}
int main() {
  int n, x, t;
  while (~scanf("%d%d", &n, &x)) {
    memset(cnt, 0, sizeof(cnt));
    for (int i = 0; i < n; ++i) {
      scanf("%d", &t);
      ++cnt[t];
    }
    printf("%d\n", (int)solve(n, x));
  }
  return 0;
}
