#include <bits/stdc++.h>
using namespace std;
const int maxn = 102;
const int mod = 1e9 + 7;
struct Matrix {
  long long mat[maxn][maxn];
  int n;
  Matrix() {
    n = 101;
    memset(mat, 0, sizeof(mat));
  }
  Matrix operator*(const Matrix &a) {
    Matrix c;
    for (int i = 1; i <= 101; ++i) {
      for (int j = 1; j <= 101; ++j) {
        for (int k = 1; k <= 101; ++k) {
          c.mat[i][j] += mat[i][k] * a.mat[k][j] % mod;
          c.mat[i][j] %= mod;
        }
      }
    }
    return c;
  }
};
Matrix qpow(Matrix a, int b) {
  Matrix c = a;
  b--;
  for (; b; b >>= 1) {
    if (b & 1) c = c * a;
    a = a * a;
  }
  return c;
}
int cnt[205];
long long dp[maxn * 2];
int main() {
  int n, x;
  scanf("%d%d", &n, &x);
  for (int i = 1, a; i <= n; ++i) {
    scanf("%d", &a);
    cnt[a]++;
  }
  dp[0] = 1;
  long long sum = 0;
  for (int i = 0; i <= 100; ++i) {
    for (int j = 1; j <= i; ++j) {
      dp[i] += dp[i - j] * cnt[j] % mod;
      dp[i] %= mod;
    }
    sum = (sum + dp[i]) % mod;
  }
  if (x <= 100) {
    sum = 0;
    for (int i = 0; i <= x; ++i) sum += dp[i], sum %= mod;
    cout << sum << endl;
    return 0;
  }
  Matrix a;
  for (int i = 1; i <= 99; ++i) {
    a.mat[i + 1][i] = 1;
  }
  for (int i = 1; i <= 100; ++i)
    a.mat[i][100] = a.mat[i][101] = cnt[100 - i + 1];
  a.mat[101][101] = 1;
  Matrix c;
  for (int i = 1; i <= 100; ++i) c.mat[1][i] = dp[i];
  c.mat[1][101] = sum;
  Matrix ans = qpow(a, x - 100);
  ans = c * ans;
  cout << ans.mat[1][101] << endl;
  return 0;
}
