#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
long long dp[105];
int cnt[105];
long long M[105][105], res[105][105], T[105][105], B[105];
int main() {
  int n, x, a;
  scanf("%d%d", &n, &x);
  for (int i = 1; i <= n; i++) scanf("%d", &a), cnt[a]++;
  dp[0] = 1;
  for (int i = 1; i <= min(100, x); i++) {
    for (int j = 1; j <= i; j++) dp[i] = (dp[i] + cnt[j] * dp[i - j]) % mod;
  }
  if (x <= 100) {
    long long sum = 0;
    for (int i = 0; i <= x; i++) sum = (sum + dp[i]) % mod;
    printf("%lld\n", sum);
  } else {
    x -= 100;
    int m = 101;
    bool s = 0;
    long long sum = 0;
    for (int i = 0; i <= 100; i++) sum = (sum + dp[i]) % mod;
    B[1] = sum;
    for (int i = 1; i <= 100; i++) B[i + 1] = dp[100 - i + 1];
    for (int i = 3; i <= 101; i++) {
      M[i][i - 1] = 1;
    }
    M[1][1] = 1;
    for (int j = 2; j <= 101; j++) {
      M[1][j] = cnt[j - 1];
      M[2][j] = cnt[j - 1];
    }
    while (x) {
      if (x % 2) {
        if (!s)
          for (int i = 1; i <= m; i++)
            for (int j = 1; j <= m; j++) res[i][j] = M[i][j];
        else {
          memset(T, 0, sizeof(T));
          for (int i = 1; i <= m; i++)
            for (int j = 1; j <= m; j++)
              for (int k = 1; k <= m; k++)
                T[i][j] = (T[i][j] + M[i][k] * res[k][j]) % mod;
          for (int i = 1; i <= m; i++)
            for (int j = 1; j <= m; j++) res[i][j] = T[i][j];
        }
        s = 1;
      }
      memset(T, 0, sizeof(T));
      for (int i = 1; i <= m; i++)
        for (int j = 1; j <= m; j++)
          for (int k = 1; k <= m; k++)
            T[i][j] = (T[i][j] + M[i][k] * M[k][j]) % mod;
      for (int i = 1; i <= m; i++)
        for (int j = 1; j <= m; j++) M[i][j] = T[i][j];
      x /= 2;
    }
    long long ans = 0;
    for (int i = 1; i <= 101; i++) {
      ans = (ans + res[1][i] * B[i]) % mod;
    }
    printf("%lld\n", ans);
  }
}
