x,y,l=$<.map &:to_i z=0 y<0&&z+=1 z+=(y.abs+l-1)/l x!=0&&z+=1+(x.abs+l-1)/l p z