from collections import deque N,X=map(int,input().split()) A=list(map(int,input().split())) A=A+A+A Q=deque() ANS=0 ind=0 SUM=0 for i in range(3*N): ind=max(ind,i) while ind