#include <bits/stdc++.h>
using namespace std;
const int N = 105, M = 100015, mod = 1000000007;
long long dis[M];
long long dp[N];
long long cnt[N];
long long n, x;
struct sett {
  long long k[N][N];
} base, plk, Ans;
sett MUL(sett a, sett b) {
  sett c;
  for (int i = 0; i < N; i++)
    for (int r = 0; r < N; r++) {
      c.k[i][r] = 0;
      for (int p = 0; p < N; p++)
        c.k[i][r] = (c.k[i][r] + a.k[i][p] * b.k[p][r] % mod) % mod;
    }
  return c;
}
sett power(sett base, int b) {
  sett ans = plk;
  for (; b; b >>= 1, base = MUL(base, base))
    if (b & 1) ans = MUL(ans, base);
  return ans;
}
int main() {
  for (int i = 0; i < N; i++) plk.k[i][i] = 1;
  scanf("%lld%lld", &n, &x);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &dis[i]);
    cnt[dis[i]]++;
  }
  dp[0] = 1;
  for (int i = 1; i < N; i++)
    for (int r = 1; r <= i; r++)
      dp[i] = (dp[i] + cnt[r] * dp[i - r] % mod) % mod;
  long long sum = 0;
  if (x <= 100) {
    for (int i = 0; i <= x; i++) sum = (sum + dp[i]) % mod;
    printf("%lld", sum);
    return 0;
  }
  for (int i = 0; i <= 100; i++) sum = (sum + dp[i]) % mod;
  for (int i = 2; i <= 100; i++) base.k[i - 2][i - 1] = 1;
  for (int i = 0; i < 100; i++) {
    base.k[99][i] = cnt[100 - i];
    base.k[100][i] = cnt[100 - i];
  }
  base.k[100][100] = 1;
  Ans = power(base, x - 100);
  long long ans = 0;
  for (int i = 0; i < 100; i++)
    ans = (ans + Ans.k[100][i] * dp[i + 1] % mod) % mod;
  ans = (ans + Ans.k[100][100] * sum % mod) % mod;
  printf("%lld", ans);
}
