#include <bits/stdc++.h>
using namespace std;
const int K = 101;
const int mod = 1000 * 1000 * 1000 + 7;
struct matrix {
  int m[K][K];
  matrix() { memset(m, 0, K * K * sizeof(int)); }
};
matrix dp, m;
int cnt[200];
matrix operator*(matrix a, matrix b) {
  matrix ans;
  for (int i = 0; i < K; i++)
    for (int j = 0; j < K; j++) {
      ans.m[i][j] = 0;
      for (int l = 0; l < K; l++) {
        ans.m[i][j] += ((long long)a.m[i][l] * b.m[l][j]) % mod;
        if (ans.m[i][j] >= mod) ans.m[i][j] -= mod;
      }
    }
  return ans;
}
matrix _pow(matrix a, int x) {
  if (x == 1) return a;
  a = _pow(a, x / 2);
  a = a * a;
  if (x % 2) return m * a;
  return a;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, x;
  cin >> n >> x;
  for (int i = 0; i < n; i++) {
    int l;
    cin >> l;
    cnt[l]++;
  }
  dp.m[0][0] = 1;
  for (int i = 1; i <= 101; i++) {
    dp.m[i][0] = 1;
    for (int j = 1; j <= i; j++) {
      dp.m[i][0] += ((long long)dp.m[i - j][0] * cnt[j]) % mod;
      if (dp.m[i][0] >= mod) dp.m[i][0] -= mod;
    }
  }
  if (x <= 100) {
    cout << dp.m[x][0];
    return 0;
  }
  m.m[0][0] = 1;
  for (int i = 1; i <= 99; i++) m.m[i][i + 1] = 1;
  m.m[100][0] = 1;
  for (int i = 1; i <= 100; i++) m.m[100][i] = cnt[101 - i];
  dp = _pow(m, x - 100) * dp;
  cout << dp.m[100][0];
  return 0;
}
