#include <bits/stdc++.h>
using namespace std;
const int maxN = 110, modP = 1000000007;
int n, d, res, a[maxN];
struct matrix {
  int m, n, matrix[maxN][maxN];
};
matrix base, c;
matrix operator*(matrix a, matrix b) {
  matrix c;
  c.m = a.m;
  c.n = b.n;
  for (int i = 0; i <= c.m; ++i)
    for (int j = 0; j <= c.n; ++j) {
      c.matrix[i][j] = 0;
      for (int t = 0; t <= a.n; ++t)
        c.matrix[i][j] =
            (1ll * c.matrix[i][j] + 1ll * a.matrix[i][t] * b.matrix[t][j]) %
            modP;
    }
  return c;
}
matrix POW(int k) {
  a[0] = 0;
  while (k) {
    a[++a[0]] = k % 2;
    k /= 2;
  }
  matrix c = base;
  for (int i = a[0] - 1; i >= 1; --i) {
    c = c * c;
    if (a[i]) c = c * base;
  }
  return c;
}
int main() {
  scanf("%d%d", &n, &d);
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    ++base.matrix[1][x];
    ++base.matrix[0][x];
  }
  base.matrix[0][0] = 1;
  base.m = min(d, 100);
  base.n = min(d, 100);
  for (int i = 2; i <= base.m; ++i) base.matrix[i][i - 1] = 1;
  c.m = min(d, 100);
  c.n = 1;
  for (int i = 2; i <= c.m; ++i) c.matrix[i][1] = 0;
  c.matrix[1][1] = 1;
  c.matrix[0][1] = 1;
  base = POW(d);
  c = base * c;
  res = c.matrix[0][1];
  cout << res;
  fclose(stdin);
  fclose(stdout);
}
