#include <bits/stdc++.h>
using namespace std;
long long** matmul(long long** arr1, long long** arr2, long long a, long long b,
                   long long c) {
  long long** res = new long long*[a];
  for (long long i = 0; i < a; i++) {
    res[i] = new long long[c];
  }
  for (long long i = 0; i < a; i++) {
    for (long long j = 0; j < c; j++) {
      res[i][j] = 0;
      for (long long k = 0; k < b; k++) {
        res[i][j] += (arr1[i][k] * arr2[k][j]) % 1000000007;
        if (res[i][j] > 1000000007) res[i][j] %= 1000000007;
      }
    }
  }
  return res;
}
long long** powmod(long long** arr, long long x, long long n) {
  long long** res = new long long*[n];
  for (long long i = 0; i < n; i++) {
    res[i] = new long long[n];
    for (long long j = 0; j < n; j++) {
      if (i != j)
        res[i][j] = 0;
      else
        res[i][j] = 1;
    }
  }
  long long** tmp = arr;
  while (x) {
    if (x & 1) res = matmul(res, tmp, n, n, n);
    x /= 2;
    tmp = matmul(tmp, tmp, n, n, n);
  }
  return res;
}
long long dp[123];
long long cnt[123];
int main() {
  dp[0] = 1;
  long long n, x, tmp;
  cin >> n >> x;
  for (long long i = 0; i < n; i++) {
    cin >> tmp;
    cnt[tmp]++;
  }
  for (long long i = 1; i < 101; i++) {
    for (long long j = 0; j < i; j++) {
      dp[i] += (dp[j] * cnt[i - j]) % 1000000007;
      ;
    }
    dp[i] %= 1000000007;
  }
  long long** pow = new long long*[101];
  for (long long i = 0; i < 101; i++) {
    pow[i] = new long long[101];
    for (long long j = 0; j < 99; j++) {
      if ((i - 1) == j) {
        pow[i][j] = 1;
      } else {
        pow[i][j] = 0;
      }
    }
  }
  long long arrr[101], tot = 1;
  for (long long i = 0; i < 100; i++) {
    arrr[i] = dp[i + 1];
    tot += arrr[i];
    pow[i][99] = cnt[100 - i];
    pow[i][100] = cnt[100 - i];
  }
  tot %= 1000000007;
  arrr[100] = tot;
  pow[100][99] = 0;
  pow[100][100] = 1;
  if (x <= 100) {
    long long tot = 0;
    for (long long i = -1; i < x; i++) tot += dp[i + 1];
    tot %= 1000000007;
    cout << tot << endl;
    return 0;
  }
  long long** fin = powmod(pow, x - 100, 101);
  long long res = 0;
  for (long long i = 0; i <= 100; i++) {
    res += (arrr[i] * fin[i][100]) % 1000000007;
  }
  res %= 1000000007;
  cout << res << endl;
}
