#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
inline void add(int &x, int y) {
  x += y;
  if (x >= mod) x -= mod;
}
int cnt[105], dp[105];
struct MAT {
  int mat[105][105];
  void init() {
    memset(mat, 0, sizeof mat);
    mat[0][0] = 1;
    for (int i = 1; i <= 100; ++i) mat[0][i] = cnt[i];
    for (int i = 1; i <= 100; ++i) mat[1][i] = cnt[i];
    for (int i = 2; i <= 100; ++i) mat[i][i - 1] = 1;
  }
  void init_e() {
    for (int i = 0; i <= 100; ++i)
      for (int j = 0; j <= 100; ++j) mat[i][j] = i == j;
  }
};
MAT operator*(MAT a, MAT b) {
  MAT res;
  memset(res.mat, 0, sizeof res.mat);
  for (int k = 0; k <= 100; ++k) {
    for (int i = 0; i <= 100; ++i) {
      if (a.mat[i][k] == 0) continue;
      for (int j = 0; j <= 100; ++j) {
        if (b.mat[k][j] == 0) continue;
        add(res.mat[i][j], 1LL * a.mat[i][k] * b.mat[k][j] % mod);
      }
    }
  }
  return res;
}
MAT operator^(MAT a, int b) {
  MAT res;
  res.init_e();
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    cnt[x]++;
  }
  if (k <= 100) {
    dp[1] = cnt[1];
    for (int i = 2; i <= k; ++i) {
      dp[i] = cnt[i];
      for (int j = 1; j <= i - 1; ++j)
        add(dp[i], 1LL * cnt[j] * dp[i - j] % mod);
    }
    int ans = 1;
    for (int i = 1; i <= k; ++i) add(ans, dp[i]);
    printf("%d\n", ans);
  } else {
    dp[1] = cnt[1];
    for (int i = 2; i <= 100; ++i) {
      dp[i] = cnt[i];
      for (int j = 1; j <= i - 1; ++j)
        add(dp[i], 1LL * cnt[j] * dp[i - j] % mod);
    }
    int sum = 1;
    for (int i = 1; i <= 100; ++i) add(sum, dp[i]);
    MAT ans;
    ans.init();
    ans = ans ^ (k - 100);
    int res = 1LL * ans.mat[0][0] * sum % mod;
    for (int i = 1; i <= 100; ++i)
      add(res, 1LL * ans.mat[0][i] * dp[101 - i] % mod);
    printf("%d\n", res);
  }
  return 0;
}
