def f(i, scores, peoples): result = 0 for j in range(i, N): if (A[j] + scores) // (peoples + 1) < K: break #print(A[j] + scores, peoples + 1) result += 1 result += f(j + 1, A[j] + scores, peoples + 1) return result N, K, *A = map(int, open(0).read().split()) A.sort(reverse = True) print(f(0, 0, 0))