#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100500, MAXD = 105, MOD = 1e9 + 7;
int N, X, d[MAXN];
struct Matrix {
  long long dat[MAXD][MAXD];
  Matrix() { memset(dat, 0, sizeof dat); }
  Matrix operator*(const Matrix& o) const {
    Matrix n;
    for (int i = 0; i < 101; i++)
      for (int j = 0; j < 101; j++)
        for (int k = 0; k < 101; k++)
          n.dat[i][j] = (n.dat[i][j] + dat[i][k] * o.dat[k][j]) % MOD;
    return n;
  }
};
Matrix powers[32];
Matrix exp(Matrix& m, int e) {
  Matrix ret;
  for (int i = 0; i < 101; i++) ret.dat[i][i] = 1;
  for (int i = 0; i <= 30; i++)
    if (e & (1 << i)) ret = ret * powers[i];
  return ret;
}
int main() {
  scanf("%d%d", &N, &X);
  for (int i = 0; i < N; i++) scanf("%d", &d[i]);
  Matrix m;
  m.dat[0][0] = 1;
  for (int i = 0; i < 100; i++) m.dat[i + 1][i] = 1;
  for (int i = 0; i < N; i++) m.dat[1][d[i]]++;
  powers[0] = m;
  for (int i = 1; i <= 30; i++) powers[i] = powers[i - 1] * powers[i - 1];
  Matrix ans_mat = exp(m, X + 1);
  int ans = (int)(ans_mat.dat[1][0] % MOD);
  printf("%d\n", ans);
  return 0;
}
