#include <bits/stdc++.h>
using namespace std;
struct mat {
  long long x[105][105];
  long long n;
  long long m;
  void print() {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        cout << x[i][j] << " ";
      }
      cout << endl;
    }
  }
  void setnm(int N, int M) {
    n = N;
    m = M;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        x[i][j] = 0;
      }
    }
  }
};
mat mul(mat x, mat t) {
  mat res;
  res.setnm(x.n, t.m);
  for (int i = 1; i <= x.n; i++) {
    for (int j = 1; j <= t.m; j++) {
      for (int k = 1; k <= x.m; k++) {
        res.x[i][j] += x.x[i][k] * t.x[k][j];
        res.x[i][j] %= 1000000007;
      }
    }
  }
  return res;
}
int n, x;
mat a;
int d[100005];
int cnt[105];
mat b;
void Calc100() {
  a.n = 1;
  a.m = 101;
  a.x[1][0] = 1;
  a.x[1][101] = 1;
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= i; j++) {
      a.x[1][i] += cnt[j] * a.x[1][i - j];
      a.x[1][i] %= 1000000007;
    }
    a.x[1][101] += a.x[1][i];
    a.x[1][101] %= 1000000007;
  }
}
mat xx;
mat fastPow(mat t, int b) {
  mat ret;
  ret.setnm(101, 101);
  for (int i = 1; i <= 101; i++)
    for (int j = 1; j <= 101; j++)
      if (i == j)
        ret.x[i][j] = 1;
      else
        ret.x[i][j] = 0;
  while (b > 0) {
    if (b % 2 == 1) ret = mul(ret, t);
    b >>= 1;
    t = mul(t, t);
  }
  return ret;
}
int main() {
  scanf("%d %d", &n, &x);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &d[i]);
    cnt[d[i]]++;
  }
  Calc100();
  b.n = 101;
  b.m = 101;
  for (int i = 1; i <= 101; i++)
    for (int j = 1; j <= 101; j++) {
      if (i == j + 1) b.x[i][j] = 1;
      if (j == 100) b.x[i][j] = cnt[101 - i];
      if (j == 101) b.x[i][j] = cnt[101 - i];
      if (j == 101 && i == 101) b.x[i][j] = 1;
    }
  if (x <= 100) {
    long long ret = 1;
    for (int i = 1; i <= x; i++) {
      ret += a.x[1][i];
      ret %= 1000000007;
    }
    printf("%lld\n", ret);
  } else {
    b = fastPow(b, x - 100);
    a = mul(a, b);
    printf("%lld\n", a.x[1][101]);
  }
  return 0;
}
