import java.util.Scanner; public class Run { public static void main (String arg[]) { Scanner scan = new Scanner(System.in); int X = scan.nextInt(); int Y = scan.nextInt(); int L = scan.nextInt(); if (X < -1000000000||X > 1000000000|| Y < -1000000000||Y > 1000000000|| L < 1 || L > 1000000000) System.exit(1); int i = 0; if (Y >= 0) { i += Y/L; if (Y%L != 0) i++; if (X!=0) { X = Math.abs(X); i++; i += X/L; if (X%L != 0) i++; } } else { Y = Math.abs(Y); i += 2; if (X!=0) { X = Math.abs(X); i += X/L; if (X%L != 0) i++; } i += Y/L; if (Y%L != 0) i++; } System.out.println(i); } }