fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } fn main() { let x: i32 = read(); let y: i32 = read(); let l: i32 = read(); let add_step = |a: i32| { if a != 0 { ((a as f32 / l as f32).ceil() as i32).abs() } else { 0 } }; let mut step = 0; if y < 0 { step += 2; } step += add_step(y); if x != 0 { step += 1; } step += add_step(x); println!("{}", step); }