#include <bits/stdc++.h>
using namespace std;
const long long inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long mod = 1e9 + 7;
const long long N = 110;
long long n, x, d[100010], num[N], dp[N];
struct node {
  long long jz[N][N];
  node operator*(const node &b) const {
    node ans;
    for (long long i = 0; i <= 100; i++) {
      for (long long j = 0; j <= 100; j++) {
        ans.jz[i][j] = 0;
      }
    }
    for (long long i = 0; i <= 100; i++) {
      for (long long j = 0; j <= 100; j++) {
        for (long long k = 0; k <= 100; k++) {
          ans.jz[i][j] = (ans.jz[i][j] + jz[i][k] * b.jz[k][j] % mod) % mod;
        }
      }
    }
    return ans;
  }
} a;
struct Node {
  long long arr[N];
  Node operator*(const node &b) const {
    Node ans;
    for (long long i = 0; i <= 100; i++) {
      ans.arr[i] = 0;
    }
    for (long long i = 0; i <= 100; i++) {
      for (long long j = 0; j <= 100; j++) {
        ans.arr[i] = (ans.arr[i] + b.jz[i][j] * arr[j] % mod) % mod;
      }
    }
    return ans;
  }
} ans;
void init() {
  memset(d, 0, sizeof(d));
  memset(num, 0, sizeof(num));
  memset(dp, 0, sizeof(dp));
}
void solve() {
  init();
  cin >> n >> x;
  for (long long i = 1; i <= n; i++) {
    cin >> d[i];
    num[d[i]]++;
  }
  dp[0] = 1;
  for (long long i = 1; i <= 100; i++) {
    for (long long j = 0; j <= i; j++) {
      dp[i] += dp[i - j] * num[j] % mod;
    }
  }
  if (x <= 100) {
    long long sum = 0;
    for (long long i = 0; i <= x; i++) {
      sum += dp[i];
      sum %= mod;
    }
    cout << sum << endl;
    return;
  }
  a.jz[0][0] = 1;
  for (long long i = 1; i <= 100; i++) {
    a.jz[0][i] = a.jz[1][i] = num[i];
  }
  for (long long i = 2; i <= 100; i++) {
    a.jz[i][i - 1] = 1;
  }
  ans.arr[0] = 1;
  ans.arr[1] = 1;
  while (x) {
    if (x & 1) {
      ans = ans * a;
    }
    a = a * a;
    x /= 2;
  }
  cout << ans.arr[0] << endl;
}
signed main() {
  ios::sync_with_stdio(false);
  cout.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
