#include <bits/stdc++.h>
using namespace std;
int n, x;
long long d[101], num[101], A[105][105];
void print() {
  for (int i = 0; i <= 100; i++) {
    for (int j = 0; j <= 100; j++) cout << A[i][j] << ' ';
    cout << endl;
  }
  cout << endl;
}
void mul(int b) {
  while (b) {
    if (b & 1) {
      long long temp[101];
      memcpy(temp, d, sizeof(d));
      for (int i = 0; i <= 100; i++) {
        d[i] = 0;
        for (int j = 0; j <= 100; j++)
          d[i] = (d[i] + A[i][j] * temp[j] % 1000000007) % 1000000007;
      }
    }
    long long B[105][105];
    memcpy(B, A, sizeof(A));
    for (int i = 0; i <= 100; i++)
      for (int j = 0; j <= 100; j++) {
        A[i][j] = 0;
        for (int k = 0; k <= 100; k++)
          A[i][j] = (A[i][j] + B[i][k] * B[k][j] % 1000000007) % 1000000007;
      }
    b = b >> 1;
  }
}
int main() {
  cin >> n >> x;
  int temp;
  for (int i = 0; i < n; i++) {
    scanf("%d", &temp);
    num[temp]++;
  }
  d[0] = 1;
  for (int i = 1; i <= 100; i++) {
    d[i] = 1;
    for (int j = 1; j <= i; j++)
      d[i] = (d[i] + num[j] * d[i - j] % 1000000007) % 1000000007;
  }
  if (x <= 100) {
    cout << d[x] << endl;
    return 0;
  }
  for (int i = 1; i < 100; i++) A[i][i + 1] = 1;
  A[0][0] = A[100][0] = 1;
  for (int i = 1; i <= 100; i++) A[100][i] = num[101 - i];
  mul(x - 100);
  cout << d[100] << endl;
  return 0;
}
