#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
long long cnt[110];
long long dp[110];
vector<vector<long long> > mult(const vector<vector<long long> >& a,
                                const vector<vector<long long> >& b) {
  vector<vector<long long> > c(101);
  for (int i = 0; i < (101); ++i) {
    c[i].resize(101);
    for (int j = 0; j < (101); ++j)
      for (int k = 0; k < (101); ++k)
        c[i][j] = (c[i][j] + (a[i][k] * b[k][j]) % MOD) % MOD;
  }
  return c;
}
vector<vector<long long> > pow(const vector<vector<long long> >& a, int pot) {
  if (pot == 0) {
    vector<vector<long long> > ans(101);
    for (int i = 0; i < (101); ++i) {
      ans[i].resize(101);
      ans[i][i] = 1;
    }
    return ans;
  }
  vector<vector<long long> > aux = pow(a, pot / 2);
  if (pot & 1) return mult(mult(aux, aux), a);
  return mult(aux, aux);
}
int solve(int x) {
  dp[0] = 1;
  dp[101] = 1;
  for (int i = 1; i < (101); ++i) {
    for (int j = 1; j < (i + 1); ++j) {
      dp[i] = (dp[i] + (dp[i - j] * cnt[j]) % MOD) % MOD;
    }
    dp[101] = (dp[101] + dp[i]) % MOD;
  }
  if (x <= 100) {
    long long ans = 0;
    for (int i = 0; i < (x + 1); ++i) ans = (ans + dp[i]) % MOD;
    return ans;
  }
  vector<vector<long long> > aux(101);
  for (int i = 0; i < (101); ++i) {
    aux[i].resize(101);
    if (i == 0) {
      aux[0][0] = 1;
      for (int j = 1; j < (101); ++j) aux[0][j] = cnt[j];
    } else if (i == 1) {
      for (int j = 1; j < (101); ++j) aux[1][j] = cnt[j];
    } else {
      aux[i][i - 1] = 1;
    }
  }
  aux = pow(aux, x - 100);
  long long ans = 0;
  for (int i = 0; i < (101); ++i) {
    ans = (ans + (aux[0][i] * dp[101 - i]) % MOD) % MOD;
  }
  return ans;
}
int main() {
  int n, x;
  scanf(" %d %d", &(n), &(x));
  for (int i = 0; i < (n); ++i) {
    int val;
    scanf(" %d", &(val));
    ++cnt[val];
  }
  printf("%d\n", solve(x));
  return 0;
}
