#include <bits/stdc++.h>
using namespace std;
const int N = 12;
const int mod = 1e9 + 7;
vector<vector<int> > mul(const vector<vector<int> >& m1,
                         const vector<vector<int> >& m2) {
  int sz = m1.size();
  vector<vector<int> > res(sz);
  for (int i = 0; i < sz; i++) res[i] = vector<int>(sz, 0);
  for (int i = 0; i < sz; i++) {
    for (int j = 0; j < sz; j++) {
      for (int k = 0; k < sz; k++) {
        res[i][j] = (res[i][j] + m1[i][k] * 1ll * m2[k][j]) % mod;
      }
    }
  }
  return res;
}
vector<vector<int> > eye(int sz) {
  vector<vector<int> > res(sz);
  for (int i = 0; i < sz; i++) {
    res[i] = vector<int>(sz, 0);
    res[i][i] = 1;
  }
  return res;
}
vector<vector<int> > exp(vector<vector<int> > mat, int pw) {
  if (pw == 0) return eye(mat.size());
  vector<vector<int> > half = exp(mat, pw / 2);
  vector<vector<int> > res = mul(half, half);
  if (pw % 2) res = mul(res, mat);
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, x, a, cnt[105];
  memset(cnt, 0, sizeof(cnt));
  cnt[0] = 1;
  cin >> n >> x;
  for (int i = 0; i < n; i++) {
    cin >> a;
    cnt[a]++;
  }
  vector<int> dp(101, 0);
  dp[0] = 1;
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= i; j++) {
      dp[i] = (dp[i] + dp[i - j] * 1ll * cnt[j]) % mod;
    }
  }
  if (x <= 100) {
    int ans = 0;
    for (int i = 0; i < x + 1; i++) ans = (ans + dp[i]) % mod;
    cout << ans << endl;
    return 0;
  }
  for (int i = 0; i < 100; i++) dp[i] = dp[i + 1];
  dp[100] = 0;
  for (int i = 0; i < 100; i++) dp[100] = (dp[100] + dp[i]) % mod;
  vector<vector<int> > matrix(101);
  for (int i = 0; i < 101; i++) matrix[i] = vector<int>(101, 0);
  for (int i = 0; i < 99; i++) matrix[i + 1][i] = 1;
  for (int i = 0; i < 100; i++) matrix[i][99] = matrix[i][100] = cnt[100 - i];
  matrix[100][100] = 1;
  vector<vector<int> > H = exp(matrix, x - 100);
  long long res = 0;
  for (int i = 0; i < 101; i++) res = (res + dp[i] * 1ll * H[i][100]) % mod;
  cout << (res + 1) % mod << endl;
  return 0;
}
