ll@N,@M,x=0,t;rep(j,M){ll@A;if(j)x+=A-t-1;t=A;}wt(x);