#include <bits/stdc++.h>
using namespace std;
const int DIM = 1e2 + 5;
const int MOD = 1e9 + 7;
int n, x;
int ways[DIM], cnt[DIM];
int mat[DIM][DIM], id[DIM][DIM], tmp[DIM][DIM], base[DIM][DIM];
inline int add(int a, int b) {
  a += b;
  if (a >= MOD) {
    a -= MOD;
  }
  return a;
}
inline int mult(int a, int b) { return (1LL * a * b) % MOD; }
void mat_mult(int a[DIM][DIM], int b[DIM][DIM], int c[DIM][DIM]) {
  for (int i = int(1); i < int(101 + 1); i++) {
    for (int j = int(1); j < int(101 + 1); j++) {
      int cur = 0;
      for (int k = int(1); k < int(101 + 1); k++) {
        cur = add(cur, mult(a[i][k], b[k][j]));
      }
      c[i][j] = cur;
    }
  }
}
void f_exp(int exp) {
  memcpy(base, mat, sizeof base);
  memcpy(mat, id, sizeof mat);
  while (exp) {
    if (exp & 1) {
      memcpy(tmp, mat, sizeof tmp);
      mat_mult(tmp, base, mat);
      exp--;
    } else {
      memcpy(tmp, base, sizeof tmp);
      mat_mult(tmp, tmp, base);
      exp >>= 1;
    }
  }
}
int main() {
  scanf("%d %d", &n, &x);
  for (int i = int(0); i < int(n); i++) {
    int cur;
    scanf("%d", &cur);
    cnt[cur]++;
  }
  int sum = 0;
  int limit = min(x, 100);
  ways[0] = 1;
  for (int i = int(0); i < int(limit + 1); i++) {
    for (int j = int(1); j < int(i + 1); j++) {
      ways[i] = add(ways[i], mult(ways[i - j], cnt[j]));
    }
    sum = add(sum, ways[i]);
  }
  if (x < 100) {
    printf("%d\n", sum);
  } else {
    for (int i = int(1); i < int(101 + 1); i++) {
      id[i][i] = 1;
    }
    for (int i = int(1); i < int(100 + 1); i++) {
      mat[1][i] = mat[101][i] = cnt[i];
    }
    for (int i = int(2); i < int(100 + 1); i++) {
      mat[i][i - 1] = 1;
    }
    mat[101][101] = 1;
    f_exp(x - 100);
    int ans = sum;
    for (int i = int(1); i < int(100 + 1); i++) {
      ans = add(ans, mult(mat[101][i], ways[100 - i + 1]));
    }
    printf("%d\n", ans);
  }
  return 0;
}
