MOD = 10 ** 9 + 7 N, K = map(int, input().split()) A = list(map(int,input().split())) from collections import defaultdict dic = defaultdict(int) dic[(0,0)] = 1 for a in A: dic2 = defaultdict(int) for (x,y),v in dic.items(): dic2[(x,y)] += v dic2[(x,y)] %= MOD dic2[(x+1,y+a)] += v dic2[(x+1,y+a)] %= MOD dic = dic2 ans = 0 for (x,y),v in dic.items(): if y >= K * x: ans += v ans %= MOD print(ans - 1)