import numpy as np md = 1000000007 n, w, k = map(int, input().split()) A = list(map(int, input().split())) L = [1]+[0]*(w*2) for i in range(1, w*2+1): L[i] = sum(L[i-a] for a in A) g1 = L[w] g2 = L[w*2] - g1**2 m = np.matrix([[g1, g2], [1, 0]], dtype=int) % md p = np.matrix(np.identity(2), dtype=int) while k: if k%2: p *= m; p %= md m *= m; m %= md k //= 2 print(p[0, 0])