#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int inf = 1e9;
long long powm(long long a, long long p, long long m) {
  long long r = 1 % m;
  while (p) {
    if (p & 1) r = r * a % m;
    p >>= 1;
    a = a * a % m;
  }
  return r;
}
class Matrix {
 public:
  int st[101][101];
  Matrix() { memset(st, 0, sizeof(st)); }
  Matrix operator*(Matrix &b) {
    Matrix res;
    for (int i = 0; i < (101); ++i)
      for (int j = 0; j < (101); ++j)
        for (int k = 0; k < (101); ++k)
          res.st[i][j] = (1ll * st[i][k] * b.st[k][j] + res.st[i][j]) % mod;
    return res;
  }
  void print(int n) {
    for (int i = 0; i < (n); ++i) {
      for (int j = 0; j < (n); ++j) printf("%d ", st[i][j]);
      puts("");
    }
  }
};
int main() {
  int n, x, d;
  scanf("%d%d", &n, &x);
  Matrix a, b;
  a.st[0][0] = 1;
  for (int i = 0; i < (n); ++i) {
    scanf("%d", &d);
    a.st[0][d]++;
    a.st[1][d]++;
  }
  for (int i = 0; i < (99); ++i) a.st[i + 2][i + 1] = 1;
  for (int i = 0; i < (101); ++i) b.st[i][i] = 1;
  while (x) {
    if (x & 1) b = b * a;
    a = a * a;
    x /= 2;
  }
  printf("%d\n", (b.st[0][0] + b.st[0][1]) % mod);
  return 0;
}
