#include <bits/stdc++.h>
using namespace std;
const char IO_MODE = 3;
inline long long ReadInt() {
  long long x = 0, s = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') s = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return s * x;
}
inline void WriteInt(long long x) {
  char c[20];
  if (!x) {
    putchar('0');
    return;
  }
  if (x < 0) putchar('-'), x = -x;
  int i = 0;
  while (x > 0) c[++i] = x % 10, x /= 10;
  while (i) putchar(c[i--] + 48);
}
template <typename T>
inline void out(T x) {
  if (IO_MODE & 1)
    WriteInt(x);
  else if (typeid(x) == typeid(int))
    printf("%i", x);
  else
    printf("%lld", (long long)x);
}
template <typename T, typename... Args>
inline void out(T x, Args... args) {
  out(x);
  putc(' ', stdout);
  out(args...);
}
template <typename T>
inline void in(T &x) {
  if (IO_MODE & 2)
    x = ReadInt();
  else if (typeid(x) == typeid(int))
    scanf("%i", &x);
  else if (typeid(x) == typeid(long long))
    scanf("%lld", &x);
}
template <typename T, typename... Args>
inline void in(T &x, Args &...args) {
  in(x);
  in(args...);
}
int aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, mm, nn, oo, pp, qq, rr, ss, tt,
    uu, vv, ww, xx, yy, zz;
int tc;
template <class T>
struct matrix {
  int n;
  vector<vector<T>> a;
  matrix(int _n, T val = 0, bool scalar_matrix = 0) {
    n = _n;
    if (scalar_matrix) {
      a.assign(n, vector<T>(n, 0));
      for (int i = 0; i < n; i++) a[i][i] = val;
    } else {
      a.assign(n, vector<T>(n, val));
    }
  }
  vector<T> &operator[](int idx) { return a[idx]; }
  matrix operator*(matrix b) {
    matrix c = matrix(n, 0);
    for (int i = n; i--;)
      for (int k = n; k--;)
        for (int j = n; j--;)
          c[i][j] = (c[i][j] + a[i][k] * b[k][j]) % 1000000007;
    return c;
  }
  vector<T> operator*(vector<T> b) {
    vector<T> c = vector<T>(n, 0);
    for (int i = n; i--;)
      for (int j = n; j--;) c[i] = (c[i] + a[i][j] * b[j]) % 1000000007;
    return c;
  }
  matrix<T> operator+(matrix<T> b) {
    matrix<T> c = matrix<T>(n, 0);
    for (int i = n; i--;)
      for (int j = n; j--;) c[i][j] = (a[i][j] + b[i][j]) % 1000000007;
    return c;
  }
  matrix<T> operator-(matrix<T> b) {
    matrix<T> c = matrix<T>(n, 0);
    for (int i = n; i--;)
      for (int j = n; j--;)
        c[i][j] = (a[i][j] - b[i][j] + 1000000007) % 1000000007;
    return c;
  }
  matrix<T> operator^(long long p) {
    if (!p) return matrix(n, 1, 1);
    if (p & 1) return *this * (*this ^ (p - 1));
    matrix<T> d = *this ^ (p / 2);
    return d * d;
  }
  matrix sumPows(long long p) {
    if (!p) return matrix(n, 1, 1);
    if (p & 1)
      return (matrix(n, 1, 1) + *this) * ((*this * *this).sumPows(p / 2));
    else
      return matrix(n, 1, 1) + *this * sumPows(p - 1);
  }
};
int main() {
  int n, x;
  in(n, x);
  matrix<long long> t(102);
  for (int i = 0; i < n; i++) t[0][ReadInt() - 1]++;
  for (int i = 1; i < 102; i++) t[i][i - 1] = 1;
  vector<long long> base(102, 0);
  base[0] = 1;
  cout << (t.sumPows(x) * base)[0] << endl;
}
