#include <bits/stdc++.h>
long int N, K, A[101][100001], a[101];
long int dp(long int n, long int m) {
  long int k, temp, s;
  if (A[n][m] != -1) {
    return A[n][m];
  } else {
    if (a[n] != 0) {
      k = m / a[n];
      temp = 0;
      for (s = 0; s < k + 1; s++) {
        temp += dp(n - 1, m - s * a[n]);
      }
    } else {
      temp = dp(n - 1, m);
    }
  }
  temp = temp % 1000000007;
  A[n][m] = temp;
  return temp;
}
int main() {
  long int i, j, x;
  long int total;
  scanf("%ld %ld", &N, &K);
  for (i = 1; i < N + 1; i++) {
    scanf("%ld", &a[i]);
  }
  for (i = 0; i < N + 1; i++) {
    for (j = 0; j < K + 1; j++) {
      A[i][j] = -1;
    }
  }
  x = 0;
  for (i = 1; i < N + 1 && x == 0; i++) {
    if (a[i] != 0) {
      x = 1;
      for (j = 0; j < K + 1; j++) {
        if (j % a[i] == 0) {
          A[i][j] = 1;
        } else {
          A[i][j] = 0;
        }
      }
    }
  }
  if (x == 0) {
    printf("0");
  } else {
    printf("%ld", dp(N, K));
  }
  return 0;
}
