#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 105;
const int matrixl = 101;
long long sum[maxn], cnt[maxn], dp[maxn];
class Matrix {
 public:
  long long m[matrixl][matrixl];
  Matrix() {
    for (int i = 0; i < matrixl; i++) {
      for (int j = 0; j < matrixl; j++) {
        if (i == j)
          m[i][j] = 1;
        else
          m[i][j] = 0;
      }
    }
  }
  Matrix operator*(Matrix b) {
    Matrix res;
    memset(res.m, 0, sizeof(res.m));
    for (int i = 0; i < matrixl; i++) {
      for (int j = 0; j < matrixl; j++) {
        for (int k = 0; k < matrixl; k++) {
          res.m[i][j] = (res.m[i][j] + m[i][k] * b.m[k][j] % mod) % mod;
        }
      }
    }
    return res;
  }
};
Matrix quickM(Matrix base, int n) {
  Matrix res;
  while (n > 0) {
    if (n & 1) res = base * res;
    base = base * base;
    n >>= 1;
  }
  return res;
}
int main() {
  int n, x, tmp;
  scanf("%d%d", &n, &x);
  memset(cnt, 0, sizeof(cnt));
  memset(dp, 0, sizeof(dp));
  memset(sum, 0, sizeof(sum));
  for (int i = 0; i < n; i++) {
    scanf("%d", &tmp);
    cnt[tmp]++;
  }
  dp[0] = 1;
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= i; j++) {
      dp[i] = (dp[i] + dp[i - j] * cnt[j]) % mod;
    }
    for (int j = i; j <= 100; j++) sum[j] = (sum[j] + dp[i]) % mod;
  }
  if (x <= 100) {
    printf("%I64d\n", sum[x] + 1);
    return 0;
  }
  Matrix a;
  sum[100]++;
  memset(a.m, 0, sizeof(a.m));
  for (int i = 0; i < 100; i++) {
    a.m[0][i] = cnt[i + 1];
    a.m[matrixl - 1][i] = cnt[i + 1];
  }
  for (int i = 1; i < 100; i++) {
    for (int j = 0; j < matrixl; j++) {
      if (i - 1 == j) a.m[i][j] = 1;
    }
  }
  a.m[matrixl - 1][matrixl - 1] = 1;
  Matrix ret = quickM(a, x - 100);
  long long ans = sum[100] * ret.m[matrixl - 1][matrixl - 1] % mod;
  for (int i = 0; i < matrixl - 1; i++) {
    ans = (ans + ret.m[matrixl - 1][i] * dp[100 - i]) % mod;
  }
  printf("%I64d\n", ans);
  return 0;
}
