#include [[nodiscard]] static inline constexpr int_fast32_t solve(const int_fast32_t X, const int_fast32_t Y, const int_fast32_t L) noexcept { if (Y < 0) return (std::abs(X) + L - 1) / L + (std::abs(Y) + L - 1) / L + 2; else if (X != 0) return (std::abs(X) + L - 1) / L + (std::abs(Y) + L - 1) / L + 1; else return (std::abs(X) + L - 1) / L + (std::abs(Y) + L - 1) / L; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); int_fast32_t X, Y, L; std::cin >> X >> Y >> L; std::cout << solve(X, Y, L) << '\n'; return 0; }