#include <bits/stdc++.h>
using namespace std;
int M = 1e9 + 7;
vector<vector<int> > multiply(const vector<vector<int> > &M1,
                              const vector<vector<int> > &M2) {
  vector<vector<int> > M3(M1.size(), vector<int>(M2[0].size(), 0));
  long long z = 1;
  for (int i = 0; i < M1.size(); i++) {
    for (int j = 0; j < M2[0].size(); j++) {
      for (int k = 0; k < M1[0].size(); k++) {
        M3[i][j] = (M3[i][j] + M1[i][k] * z * M2[k][j]) % M;
      }
    }
  }
  return M3;
}
vector<vector<int> > pow(vector<vector<int> > M, int p) {
  if (p == 1) return M;
  vector<vector<int> > temp = pow(M, p / 2);
  temp = multiply(temp, temp);
  if (p % 2 == 0)
    return temp;
  else
    return multiply(temp, M);
}
int main() {
  int n, d;
  scanf("%d%d", &n, &d);
  vector<vector<int> > g(102, vector<int>(102, 0));
  for (int i = 0, a; i < n; i++) {
    scanf("%d", &a);
    g[a][1]++;
    g[a][101]++;
  }
  for (int i = 0; i < 100; i++) g[i][i + 1]++;
  g[0][101]++;
  g[101][101]++;
  g = pow(g, d + 1);
  printf("%d\n", g[0][101]);
  return 0;
}
