#include <bits/stdc++.h>
using namespace std;
struct matrix {
  long long x, y, a[110][110];
  matrix(){};
  matrix(long long xx, long long yy) : x(xx), y(yy) { memset(a, 0, sizeof(a)); }
} s;
long long n, x, cnt[120], sum[120], dp[120];
inline long long read() {
  register long long x = 0, f = 0, ch = getchar();
  while ('0' > ch || ch > '9') f ^= ch == '-', ch = getchar();
  while ('0' <= ch && ch <= '9')
    x = (x << 1) + (x << 3) + (ch ^ '0'), ch = getchar();
  return f ? -x : x;
}
inline matrix mul(matrix A, matrix B) {
  matrix C = (matrix){A.x, B.y};
  for (int i = 1; i <= A.x; i++)
    for (int j = 1; j <= B.y; j++)
      for (int k = 1; k <= B.x; k++)
        C.a[i][j] = (C.a[i][j] + A.a[i][k] * B.a[k][j]) % 1000000007;
  return C;
}
inline void init() {
  n = read(), x = read();
  for (int i = 1; i <= n; i++) cnt[read()]++;
  dp[0] = 1, sum[0] = 1;
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= i; j++)
      dp[i] = (dp[i] + dp[i - j] * cnt[j]) % 1000000007;
    sum[i] = (sum[i - 1] + dp[i]) % 1000000007;
  }
  s.x = 101, s.y = 101;
  for (int i = 1; i <= 99; i++)
    s.a[i + 1][i] = 1, s.a[i][100] = cnt[101 - i], s.a[i][101] = cnt[101 - i];
  s.a[100][100] = s.a[100][101] = cnt[1], s.a[101][101] = 1;
}
matrix qpow(matrix s, long long b) {
  matrix C = (matrix){s.x, s.y};
  for (int i = 1; i <= 101; i++) C.a[i][i] = 1;
  while (b) {
    if (b & 1) C = mul(C, s);
    b >>= 1;
    s = mul(s, s);
  }
  return C;
}
int main() {
  init();
  matrix A = (matrix){1, 101};
  for (int i = 1; i <= 100; i++) A.a[1][i] = dp[i];
  A.a[1][101] = sum[100];
  if (x <= 100) {
    printf("%lld\n", sum[x]);
    return 0;
  }
  A = mul(A, qpow(s, x - 100));
  printf("%lld\n", A.a[1][101] % 1000000007);
  return 0;
}
