#include <bits/stdc++.h>
using namespace std;
int c[101];
long long int mat[101];
void process() {
  mat[0] = 0;
  for (int i = 1; i < 101; i++) {
    for (int j = 1; j < 101; j++) {
      if ((i - j) >= 0)
        mat[i] = (mat[i] + (c[j] * (1 + mat[i - j]))) % 1000000007LL;
    }
  }
}
void mulSquareMatrix(long long int a[][101], long long int b[][101], int n) {
  long long int temp[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      temp[i][j] = 0;
      for (int k = 0; k < n; k++) {
        temp[i][j] = (temp[i][j] + (a[i][k] * b[k][j])) % 1000000007LL;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      a[i][j] = temp[i][j];
    }
  }
}
void matrixExponent(long long int x[][101], int m, long long int n) {
  long long int result[m][101];
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < m; j++) {
      result[i][j] = (i == j);
    }
  }
  while (n) {
    if (n & 1) {
      mulSquareMatrix(result, x, m);
    }
    mulSquareMatrix(x, x, m);
    n >>= 1;
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < m; j++) {
      x[i][j] = result[i][j];
    }
  }
}
long long int func(long long int n) {
  if (n < 101) return (mat[n] + 1) % 1000000007LL;
  long long int x[101][101];
  memset(x, 0, sizeof(x));
  for (int i = 0; i < 101 - 2; i++) {
    x[i][i + 1] = 1;
  }
  for (int i = 0; i < 101; i++) x[101 - 2][i] = c[101 - i - 1];
  x[101 - 2][101 - 1] = 1;
  x[101 - 1][101 - 1] = 1;
  matrixExponent(x, 101, n - 101 + 2);
  long long int result = 0;
  mat[101 - 1] = 0;
  for (int i = 0; i < 101; i++) {
    result = (result + (x[101 - 2][i] * (1 + mat[i]))) % 1000000007LL;
  }
  return result % 1000000007LL;
}
int main() {
  int n, x, dis;
  scanf("%d%d", &n, &x);
  for (int i = 0; i < n; i++) {
    scanf("%d", &dis);
    c[dis]++;
  }
  process();
  printf("%lld\n", func(x));
  return 0;
}
