import java.util.*; class Main{ private static long MOD = 1000000007; private static long fac[] = new long[50000]; private static long modpow(long x, long p){ long ret = 1; while (p > 0){ if (p % 2 == 1) ret = (ret * x) % MOD; x = (x * x) % MOD; p >>= 1; } return ret; } private static long nCr(int n, int r){ if (n < r) return 0; return (((fac[n] * modpow(fac[n - r], MOD - 2)) % MOD) * modpow(fac[r], MOD - 2)) % MOD; } private static int min(int x, int y){ if (x < y) return x; return y; } public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int MP = sc.nextInt(); int Mq = sc.nextInt(); int L = sc.nextInt(); int S[] = new int[N]; for (int i = 0; i < N; i++){ S[i] = sc.nextInt(); } long dp[][] = new long[N + 1][Mq + 1]; dp[0][Mq] = 1; for (int i = 1; i <= min(S[0], Mq); i++){ dp[1][Mq - i] = 1; } for (int i = 1; i < N; i++){ for (int k = N; k >= 1; k--){ long sum = 0; for (int r = Mq; r >= 0; r--){ dp[k][r] = (dp[k][r] + sum) % MOD; sum = (sum + dp[k - 1][r]) % MOD; if (r + S[i] <= Mq) sum = (sum - dp[k - 1][r + S[i]] + MOD) % MOD; } } } fac[0] = 1; for (int i = 1; i < 50000; i++){ fac[i] = (fac[i - 1] * i) % MOD; } long ans = 0; for (int m = 0; m <= Mq; m++){ for (int x = 0; x <= N; x++){ ans = (ans + dp[x][Mq - m] * nCr(MP + m - L * x + N - 1, N - 1)) % MOD; } } System.out.println(ans); } }