#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
struct Node {
  long long M[210];
} dp;
struct node {
  long long M[210][210];
} a;
long long n, m;
long long b[110];
node operator*(node a, node b) {
  node ans;
  for (long long i = 1; i <= 101; i++) {
    for (long long j = 1; j <= 101; j++) {
      ans.M[i][j] = 0;
    }
  }
  for (long long i = 1; i <= 101; i++) {
    for (long long j = 1; j <= 101; j++) {
      for (long long k = 1; k <= 101; k++) {
        ans.M[i][j] = (ans.M[i][j] + a.M[i][k] * b.M[k][j] % mod) % mod;
      }
    }
  }
  return ans;
}
Node operator*(Node a, node b) {
  Node ans;
  for (long long i = 1; i <= 101; i++) ans.M[i] = 0;
  for (long long i = 1; i <= 101; i++) {
    for (long long j = 1; j <= 101; j++) {
      ans.M[i] = (ans.M[i] + b.M[i][j] * a.M[j] % mod) % mod;
    }
  }
  return ans;
}
signed main() {
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    long long u;
    cin >> u;
    b[u]++;
  }
  a.M[1][1] = 1;
  for (long long i = 2; i <= 101; i++) {
    a.M[1][i] = b[i - 1];
    a.M[2][i] = b[i - 1];
  }
  for (long long i = 3; i <= 101; i++) {
    a.M[i][i - 1] = 1;
  }
  dp.M[1] = 1;
  dp.M[2] = 1;
  while (m > 0) {
    if (m & 1) dp = dp * a;
    a = a * a;
    m >>= 1;
  }
  cout << dp.M[1] << endl;
}
