#include <bits/stdc++.h>
using namespace std;
const int N = 100;
const int SIZE = N + 1;
const int mod = 1e9 + 7;
int n, k, cnt[N + 10];
struct Matrix {
  long long m[N + 2][N + 2];
  void init() {
    clear();
    for (int i = 1; i < SIZE; ++i) m[0][i] = m[1][i] = cnt[i];
    m[0][0] = 1;
    for (int i = 2; i < SIZE; ++i) m[i][i - 1] = 1;
  }
  void unit() {
    for (int i = 0; i < SIZE; ++i)
      for (int j = 0; j < SIZE; ++j) m[i][j] = i == j;
  }
  void clear() { memset(m, 0, sizeof(m)); }
  Matrix operator*(const Matrix &o) {
    Matrix ret;
    ret.clear();
    for (int i = 0; i < SIZE; ++i)
      for (int j = 0; j < SIZE; ++j)
        for (int k = 0; k < SIZE; ++k)
          ret.m[i][j] = (ret.m[i][j] + m[i][k] * o.m[k][j] % mod) % mod;
    return ret;
  }
};
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0, x; i < n; ++i) {
    scanf("%d", &x);
    cnt[x]++;
  }
  Matrix ans, x;
  ans.unit();
  x.init();
  while (k) {
    if (k & 1) ans = ans * x;
    k >>= 1;
    x = x * x;
  }
  cout << (ans.m[0][0] + ans.m[0][1]) % mod << endl;
  return 0;
}
