program main implicit none real(8) :: X, Y, L read *, X read *, Y read *, L if (X == 0) then if (Y >= 0) then print *, ceiling(abs(Y) / L) else print *, ceiling(abs(Y) / L) + 2 end if else if (Y >= 0) then print *, ceiling(abs(Y) / L) + 1 + ceiling(abs(X) / l) else print *, ceiling(abs(Y) / L) + 2 + ceiling(abs(X) / l) end if end program main