#include <bits/stdc++.h>
using namespace std;
struct Matrix {
  int X[101][101];
  Matrix() {}
  Matrix(int k) {
    memset(X, 0, sizeof(X));
    for (int i = 0; i < 101; i++) X[i][i] = k;
  }
};
Matrix operator*(Matrix &A, Matrix &B) {
  Matrix M;
  for (int i = 0; i < 101; i++) {
    for (int j = 0; j < 101; j++) {
      long long tmp = 0;
      for (int k = 0; k < 101; k++) {
        tmp += (long long)A.X[i][k] * B.X[k][j];
        tmp %= 1000000007;
      }
      M.X[i][j] = tmp;
    }
  }
  return M;
}
Matrix pow(Matrix x, long long n) {
  Matrix P(1);
  while (n) {
    if (n & 1) P = P * x;
    n >>= 1;
    x = x * x;
  }
  return P;
}
int d[100005], f[3 * 101 + 5];
int main() {
  int sum, n;
  cin >> n >> sum;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &d[i]);
  }
  Matrix base(0);
  for (int i = 0; i < n; ++i) {
    base.X[0][d[i] - 1]++;
  }
  for (int i = 1; i < 101 - 1; ++i) {
    base.X[i][i - 1] = 1;
  }
  base.X[101 - 1][101 - 1] = 1;
  base.X[101 - 1][101 - 3] = 1;
  base = pow(base, sum);
  f[0] = 1;
  for (sum = 0; sum <= 101; ++sum) {
    for (int i = 0; i < n; ++i) {
      f[sum + d[i]] += f[sum];
      f[sum + d[i]] %= 1000000007;
    }
  }
  int res = 0, ok = 100;
  for (int i = 0; i < 101; ++i) {
    if (i == 101 - 1) ok = 101;
    res += (long long)base.X[101 - 1][i] * f[ok - i - 1] % 1000000007;
    res %= 1000000007;
  }
  cout << res << endl;
  return 0;
}
