import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = Math.abs(sc.nextInt()); int k = sc.nextInt(); int ans = 0; if (y < 0) { ans++; y = -y; } ans += (x + k - 1) / k; ans += (y + k - 1) / k; System.out.println(ans); } }