use std::io::{self, BufReader, BufWriter, Read, Write}; fn main() { let stdin = io::stdin(); let mut stdin = BufReader::new(stdin.lock()); let stdout = io::stdout(); let mut stdout = BufWriter::new(stdout.lock()); let mut buf = String::new(); stdin.read_to_string(&mut buf).unwrap(); let mut iter = buf.split_whitespace(); let x: i64 = iter.next().unwrap().parse().unwrap(); let y: i64 = iter.next().unwrap().parse().unwrap(); let l: i64 = iter.next().unwrap().parse().unwrap(); let mut n = 0; if y >= 0 { if y.abs() <= l && y != 0 { n += 1; } else { n += y.abs() / l; if y.abs() % l != 0 { n += 1; } } if x != 0 { n += 1; } if x.abs() <= l && x != 0 { n += 1; } else { n += x.abs() / l; if x.abs() % l != 0 { n += 1; } } } else { n += 2; if x.abs() <= l && x != 0 { n += 1; } else { n += x.abs() / l; if x.abs() % l != 0 { n += 1; } } if y.abs() <= l && y != 0 { n += 1; } else { n += y.abs() / l; if y.abs() % l != 0 { n += 1; } } } writeln!(&mut stdout, "{}", n).unwrap(); }