#include <bits/stdc++.h>
using namespace std;
long long md = 1e9 + 7;
struct Matrix {
  vector<vector<long long> > mat;
  long long n;
  Matrix(long long n = 0, bool identity = false) : n(n) {
    mat.resize(n);
    for (long long i = 0; i < n; i++) mat[i] = vector<long long>(n, 0);
    if (identity) {
      for (long long i = 0; i < n; i++) mat[i][i] = 1;
    }
  }
  vector<long long>& operator[](long long i) { return mat[i]; }
  Matrix operator*(Matrix b) {
    Matrix ret(n);
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < n; j++) {
        for (long long k = 0; k < n; k++) {
          ret[i][j] += (*this)[i][k] * b[k][j];
          ret[i][j] %= md;
        }
      }
    }
    return ret;
  }
  Matrix operator+(Matrix x) {
    Matrix ret(n);
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < n; j++) {
        ret[i][j] = (*this)[i][j] + x[i][j];
        if (ret[i][j] >= md) {
          ret[i][j] -= md;
        }
        if (ret[i][j] < 0) {
          ret[i][j] += md;
        }
      }
    }
    return ret;
  }
  long long operator==(Matrix x) {
    for (long long i = 0; i < n; i++)
      for (long long j = 0; j < n; j++)
        if ((*this)[i][j] != x[i][j]) return 0;
    return 1;
  }
  Matrix operator-(Matrix x) {
    Matrix ret(n);
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < n; j++) {
        ret[i][j] = (*this)[i][j] - x[i][j];
        if (ret[i][j] >= md) {
          ret[i][j] -= md;
        }
        if (ret[i][j] < 0) {
          ret[i][j] += md;
        }
      }
    }
    return ret;
  }
  void operator=(Matrix x) {
    this->n = x.n;
    (this->mat).resize(n);
    for (long long i = 0; i < n; i++) {
      (this->mat)[i] = x[i];
    }
  }
  void operator+=(Matrix x) {
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < n; j++) {
        (*this)[i][j] = (*this)[i][j] + x[i][j];
        if ((*this)[i][j] >= md) {
          (*this)[i][j] -= md;
        }
        if ((*this)[i][j] < 0) {
          (*this)[i][j] += md;
        }
      }
    }
  }
};
Matrix power(Matrix a, long long p) {
  long long n = a.n;
  Matrix ret(n, true);
  while (p > 0) {
    if (p % 2 == 1) {
      ret = ret * a;
    }
    p /= 2;
    a = a * a;
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  long long d[101];
  long long n, x;
  cin >> n >> x;
  memset(d, (0), sizeof(d));
  for (long long(i) = 0; (i) < (n); (i)++) {
    long long t;
    cin >> t;
    d[t]++;
  }
  long long dp[100 + 2];
  memset(dp, (0), sizeof(dp));
  dp[0] = 1;
  for (long long(i) = 0; (i) < (100 + 2); (i)++)
    for (long long(j) = (1); (j) < (100 + 1); (j)++) {
      if (i + j < 100 + 2 and dp[i] != 0) {
        dp[i + j] += dp[i] * d[j];
        dp[i + j] %= md;
      }
    }
  for (long long(i) = 0; (i) < (100 + 1); (i)++) {
    dp[i + 1] += dp[i];
    dp[i + 1] %= md;
  }
  Matrix a(100 + 1);
  for (long long(i) = 0; (i) < (100); (i)++) a.mat[i][i + 1] = 1;
  for (long long(i) = (1); (i) < (100 + 1); (i)++) a.mat[i][0] -= d[i];
  for (long long(i) = 0; (i) < (100); (i)++) a.mat[i][0] += d[i + 1];
  for (long long(i) = 0; (i) < (101); (i)++)
    for (long long(j) = 0; (j) < (101); (j)++) a.mat[i][j] += md;
  a[0][0] += 1;
  a = power(a, x + 1);
  cout << a.mat[0][1] << "\n";
  return 0;
}
