use std::io; use std::str::FromStr; fn main() { let stdin = io::stdin(); let mut buf = String::new(); stdin.read_line(&mut buf).ok(); let mut it = buf.split_whitespace().map(|n| i64::from_str(n).unwrap()); let a = it.next().unwrap(); let mut buf = String::new(); stdin.read_line(&mut buf).ok(); let mut it = buf.split_whitespace().map(|n| i64::from_str(n).unwrap()); let b = it.next().unwrap(); let mut buf = String::new(); stdin.read_line(&mut buf).ok(); let mut it = buf.split_whitespace().map(|n| i64::from_str(n).unwrap()); let c = it.next().unwrap(); let mut ans = 0; ans += (a / c).abs(); ans += (b / c).abs(); if a % c != 0 { ans += 1; } if b % c != 0 { ans += 1; } if a != 0 && b != 0 { ans += 1; } println!("{}", ans); }