def main(): n,w=map(int,input().split()) a=[int(input()) for _ in range(n)] d={} ans=0 cur=0 r=0 for l in range(n): while r