#include <bits/stdc++.h>
using namespace std;
const int N = 100002;
int n, a[N], ki;
long long f[N];
struct data {
  long long val[102][102];
  void set() {
    memset(val, 0, sizeof(val));
    for (int i(1); i <= 100; i++) {
      for (int j(1); j <= 100; j++) {
        if (i == 1)
          val[i][j] = a[j];
        else {
          if (i - j == 1) val[i][j] = 1;
        }
      }
    }
    for (int j = 1; j <= 101; j++) {
      if (j == 101)
        val[101][j] = 1;
      else
        val[101][j] = val[1][j];
    }
  }
};
data res;
data operator*(data a1, data a2) {
  for (int i(1); i <= 101; i++) {
    for (int j(1); j <= 101; j++) {
      res.val[i][j] = 0;
      for (int k(1); k <= 101; k++) {
        res.val[i][j] =
            (res.val[i][j] + a1.val[i][k] * 1ll * a2.val[k][j]) % 1000000007;
      }
    }
  }
  return res;
}
data now, e;
void nhan(long long x) {
  bool ok = 0;
  for (int i(0); i < (30); i++) {
    if (i > 0) e = e * e;
    if ((((x) >> (i)) & 1)) {
      if (!ok) {
        now = e;
        ok = 1;
      } else {
        now = now * e;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> ki;
  for (int i(1); i <= n; i++) {
    int x;
    cin >> x;
    a[x]++;
  }
  f[0] = 1;
  for (int i = 1; i <= 1001; i++) {
    for (int j(1); j <= 100; j++) {
      int x = i - j;
      if (x >= 0) f[i] = (f[i] + f[x] * 1ll * a[j]) % 1000000007;
    }
  }
  if (ki <= 100) {
    long long res = 0;
    for (int i(0); i < (ki + 1); i++) res = (res + f[i]) % 1000000007;
    cout << res;
    return 0;
  }
  data tmp;
  tmp.set();
  e = tmp;
  nhan(ki - 100);
  long long res = 0, cur = 0;
  for (int i = 100; i >= 1; i--) {
    res = res + now.val[101][100 - i + 1] * 1ll * f[i];
    res %= 1000000007;
    cur = cur + f[i];
  }
  res = res + now.val[101][101] * 1ll * cur;
  res %= 1000000007;
  cout << (res + 1) % 1000000007;
}
