program W implicit none integer::X,Y,L read*,X,Y,L print"(i0)",merge(2,merge(1,0,X/=0),Y<0)& +(abs(X)-1)/L+1& +(abs(Y)-1)/L+1 end program W