ll@n,@m,@b,z=0;rep(m-1){ll@a,d=a-b;z+=d-1&d?:d/2;b=a;}wt(z);