import sys input = sys.stdin.readline from collections import * n, w = map(int, input().split()) a = [int(input()) for _ in range(n)] ans = 0 r = 0 now = 0 cnt = defaultdict(int) for l in range(n): while r