#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
struct Matrix {
  int n = 101;
  long long a[101][101];
  Matrix() { memset(a, 0, sizeof(a)); }
  void id() {
    for (int i = 0; i < n; i++) a[i][i] = 1;
  }
  Matrix operator*(const Matrix &b) const {
    Matrix c;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        for (int k = 0; k < n; k++) {
          c.a[i][j] += a[i][k] * b.a[k][j] % MOD;
          while (c.a[i][j] >= MOD) c.a[i][j] -= MOD;
        }
      }
    }
    return c;
  }
};
int n;
int x;
int p;
int c[105];
long long dp[105], ans[105];
Matrix bpow(Matrix a, int b) {
  Matrix ret;
  ret.id();
  while (b) {
    if (b & 1) ret = ret * a;
    a = a * a;
    b >>= 1;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> x;
  for (int i = 1; i <= n; i++) {
    cin >> p;
    c[p]++;
  }
  dp[0] = 1;
  ans[0] = 1;
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= 100; j++) {
      if (i - j < 0) break;
      dp[i] += dp[i - j] * c[j] % MOD;
      while (dp[i] >= MOD) dp[i] -= MOD;
    }
    ans[i] = ans[i - 1] + dp[i];
    while (ans[i] >= MOD) ans[i] -= MOD;
  }
  if (x <= 100) {
    cout << ans[x];
    return 0;
  }
  Matrix b;
  for (int i = 1; i <= 100; i++) {
    b.a[0][i] = b.a[1][i] = c[i];
  }
  b.a[0][0] = 1;
  b.a[1][0] = 0;
  for (int i = 2; i <= 100; i++) b.a[i][i - 1] = 1;
  Matrix r = bpow(b, x - 100);
  long long sol = 0;
  for (int i = 0; i <= 100; i++) {
    if (i == 0)
      sol += ans[100] % MOD;
    else
      sol += r.a[0][i] * dp[100 - i + 1] % MOD;
    while (sol >= MOD) sol -= MOD;
  }
  cout << sol << endl;
  ;
  return 0;
}
