#include <bits/stdc++.h>
using namespace std;
constexpr int N = 100 + 10;
constexpr int MOD = 1e9 + 7;
struct Mat {
  long long m[N][N], n;
  Mat(int _n, int f) {
    n = _n;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) m[i][j] = (i == j && f);
  }
  long long* operator[](int p) { return m[p]; }
} base(101, 0), base2(101, 0);
long long n, dp[N], x, cnt[N], d;
Mat operator*(Mat lhs, Mat rhs) {
  Mat ret(101, 0);
  for (int i = 0; i < ret.n; i++)
    for (int j = 0; j < ret.n; j++)
      for (int k = 0; k < ret.n; k++)
        ret[i][j] = (ret[i][j] + lhs[i][k] * rhs[k][j]) % MOD;
  return ret;
}
Mat operator^(Mat mt, int p) {
  Mat ret(101, 1);
  while (p) {
    if (p & 1) ret = ret * mt;
    mt = mt * mt;
    p >>= 1;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> x;
  for (int i = 0; i < n; i++) {
    cin >> d;
    cnt[d]++;
    base2[100 - d][100]++;
    base2[100 - d][99]++;
  }
  dp[0] = 1;
  base2[100][100] = 1;
  for (int i = 1; i < 100; i++) base2[i][i - 1] = 1;
  for (int i = 1; i <= min(100, (int)x); i++) {
    for (int j = 1; j <= i; j++) dp[i] += (cnt[j] * dp[i - j]) % MOD;
    dp[i] %= MOD;
    base[0][i - 1] = dp[i];
    base[0][100] += dp[i];
    base[0][100] %= MOD;
  }
  if (x <= 100) {
    cout << (base[0][100] + 1) % MOD << '\n';
    return 0;
  }
  base = base * (base2 ^ (x - 100));
  cout << (base[0][100] + 1) % MOD << '\n';
  return 0;
}
