#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long dp[102];
long long cnt[102];
struct matrix {
  long long a[105][105], len;
  matrix(long long n, long long as) {
    len = n;
    memset(a, 0, sizeof(a));
    for (long long i = 0; i < len; i++) {
      a[i][i] = as;
    }
  }
  matrix operator*(const matrix m) const {
    matrix ret((long long)len, 0);
    for (long long i = 0; i < len; i++) {
      for (long long j = 0; j < len; j++) {
        for (long long k = 0; k < len; k++) {
          ret.a[i][j] = (ret.a[i][j] + (a[i][k] * m.a[k][j]) % mod) % mod;
        }
      }
    }
    return ret;
  }
  matrix operator^(long long ix) const {
    matrix unit((long long)len, 1);
    for (long long i = 0; i < len; i++) {
      assert(unit.a[i][i] == 1);
    }
    long long i = 0;
    matrix m = *this;
    while (ix) {
      if (ix & (1LL << i)) {
        ix -= (1 << i);
        unit = unit * m;
      }
      i++;
      m = m * m;
    }
    return unit;
  }
};
int main() {
  long long n, x;
  cin >> n >> x;
  for (long long i = 1; i <= n; i++) {
    long long num;
    cin >> num;
    cnt[num]++;
  }
  dp[0] = 1;
  for (long long i = 1; i <= 100; i++) {
    for (long long j = 0; j <= i - 1; j++) {
      dp[i] += dp[j] * cnt[i - j];
      dp[i] %= mod;
    }
  }
  long long sum = 0;
  for (long long i = 0; i <= 100; i++) {
    sum += dp[i];
    sum %= mod;
  }
  if (x <= 100) {
    sum = 0;
    for (long long i = 0; i <= x; i++) {
      sum += dp[i];
      sum %= mod;
    }
    cout << sum;
    exit(0);
  }
  matrix m(101, 0);
  for (long long i = 0; i < 99; i++) {
    m.a[i][i + 1] = 1;
  }
  for (long long i = 0; i < 100; i++) {
    m.a[99][i] = cnt[100 - i];
    m.a[100][i] = cnt[100 - i];
  }
  m.a[100][100] = 1;
  m = m ^ (x - 100);
  long long ans = sum * m.a[100][100];
  ans %= mod;
  for (long long i = 0; i < 100; i++) {
    ans += (((m.a[100][i]) % mod) * ((dp[i + 1]) % mod)) % mod;
    ans %= mod;
  }
  cout << ans;
  return 0;
}
