ll c,n,a,i,x[2d5]={1};{rd(c,n);rep(i,n)rd(a),x[0..c]?x[a..]=min(x[a..]-1ull,x[0..])+1:0;wt(x[c]-1);}