import collections N,W = map(int, input().split()) A = [] for _ in range(N): A.append(int(input())) D = collections.defaultdict(int) ans = 0 j = 0 s = 0 for i in range(N+1): while j