#![allow(unused_imports)] use proconio::{ fastout, input, marker::{Bytes, Chars, Isize1, Usize1}, source::line::LineSource, }; use std::cmp::{max, min, Ordering, Reverse}; use std::collections::*; use std::{f64, i128, i32, i64, u128, u32, u64}; #[fastout] fn main() { input! { X: i64, Y: i64, L: u64, } // let mut ans = 0u64; let x_count = (X.abs() as u64 + L - 1) / L; let y_count = (Y.abs() as u64 + L - 1) / L; let mut ans = 0; if (X > 0 && Y == 0) || (X == 0 && Y > 0) || (X == 0 && Y < 0) { ans += 1; } else if X < 0 { ans += 2 } println!("{}", x_count + y_count + ans) }