#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
long long mul_res[102][102];
void multiply(long long a[][102], long long b[][102]) {
  memset(mul_res, 0, sizeof mul_res);
  for (int i = 0; i < 102; i++) {
    for (int j = 0; j < 102; j++) {
      for (int k = 0; k < 102; k++)
        mul_res[i][j] = (mul_res[i][j] + a[i][k] * b[k][j]) % 1000000007ll;
    }
  }
}
long long big_res[102][102];
long long init[102][102];
void matrix_expo(long long n) {
  if (n == 0) {
    memset(big_res, 0, sizeof big_res);
    for (int i = (0); i < (102); ++i) big_res[i][i] = 1;
    return;
  }
  if (n % 2 == 0) {
    matrix_expo(n / 2);
    multiply(big_res, big_res);
    for (int i = (0); i < (102); ++i) {
      for (int j = (0); j < (102); ++j) big_res[i][j] = mul_res[i][j];
    }
  } else {
    matrix_expo(n - 1);
    multiply(big_res, init);
    for (int i = (0); i < (102); ++i) {
      for (int j = (0); j < (102); ++j) big_res[i][j] = mul_res[i][j];
    }
  }
}
long long dp[101], ar[101];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, x;
  cin >> n >> x;
  for (int i = (0); i < (n); ++i) {
    long long d;
    cin >> d;
    ar[d]++;
  }
  dp[0] = 1;
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= i; j++)
      dp[i] = (dp[i] + ar[j] * dp[i - j]) % 1000000007ll;
  }
  for (int i = 100; i >= 1; i--) {
    init[1][i] = init[0][i] = ar[i];
  }
  init[0][0] = 1;
  for (int i = 2; i <= 100; i++) {
    init[i][i - 1] = 1;
  }
  long long sum = 0;
  if (x <= 100) {
    for (int i = 0; i <= x; i++) sum = (sum + dp[i]) % 1000000007ll;
    cout << sum << endl;
  } else {
    matrix_expo(x - 100);
    for (int i = 0; i <= 100; i++) sum = (sum + dp[i]) % 1000000007ll;
    sum = (sum * big_res[0][0]) % 1000000007ll;
    for (int i = 0; i <= 100; i++) {
      sum = (sum + dp[100 - i] * big_res[0][i + 1]) % 1000000007ll;
    }
    cout << sum << endl;
  }
}
