#include <bits/stdc++.h>
using namespace std;
long long cnt[110], mat[110][110];
int n, x;
long long ans, sum;
long long dp[110];
void print() {
  freopen("data.txt", "w", stdout);
  for (int i = 0; i < 101; ++i) {
    for (int j = 0; j < 101; ++j) {
      cout << mat[i][j] << " ";
    }
    cout << endl;
  }
}
void mul(long long a[][110], long long b[][110]) {
  long long tmp[110][110];
  memset(tmp, 0LL, sizeof(tmp));
  for (int i = 0; i < 101; ++i) {
    for (int j = 0; j < 101; ++j) {
      for (int k = 0; k < 101; ++k) {
        tmp[i][j] = (tmp[i][j] + (a[i][k] * b[k][j] % 1000000007 + 1000000007) %
                                     1000000007) %
                    1000000007;
      }
    }
  }
  for (int i = 0; i < 101; ++i) {
    for (int j = 0; j < 101; ++j) {
      b[i][j] = tmp[i][j];
    }
  }
}
void matMul(int pw) {
  long long res[110][110];
  memset(res, 0LL, sizeof(res));
  for (int i = 0; i < 101; ++i) {
    for (int j = 0; j < 101; ++j) {
      if (i == j) res[i][j] = 1LL;
    }
  }
  while (pw) {
    if (pw & 1) {
      mul(mat, res);
    }
    mul(mat, mat);
    pw /= 2;
  }
  for (int i = 0; i < 101; ++i) {
    for (int j = 0; j < 101; ++j) {
      mat[i][j] = res[i][j];
    }
  }
}
int main() {
  int d;
  while (cin >> n >> x) {
    memset(cnt, 0LL, sizeof(cnt));
    for (int i = 0; i < n; ++i) {
      scanf("%d", &d);
      cnt[d]++;
    }
    sum = 1LL;
    memset(dp, 0LL, sizeof(dp));
    dp[0] = 1LL;
    for (int i = 1; i <= min(x, 99); ++i) {
      for (int j = 1; j <= min(i, 100); ++j) {
        dp[i] = (dp[i] +
                 (cnt[j] * dp[i - j] % 1000000007 + 1000000007) % 1000000007) %
                1000000007;
      }
      sum = (dp[i] + sum) % 1000000007;
    }
    if (x <= 99) {
      cout << sum << endl;
    } else {
      memset(mat, 0LL, sizeof(mat));
      for (int i = 0; i < 100; ++i) {
        mat[0][i] = cnt[i + 1] % 1000000007;
        mat[100][i] = cnt[i + 1] % 1000000007;
      }
      for (int i = 1; i < 100; ++i) {
        mat[i][i - 1] = 1LL;
      }
      mat[100][100] = 1LL;
      matMul(x - 99);
      ans = sum;
      for (int i = 0; i < 100; ++i) {
        ans = (ans + mat[100][i] * dp[99 - i] % 1000000007) % 1000000007;
      }
      cout << ans << endl;
    }
  }
  return 0;
}
