import java.util.Scanner; class No48 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); int L = sc.nextInt(); int changeInDirection = 0; if (X > 0 || X < 0) { changeInDirection++; if (Y < 0) { changeInDirection++; } } else if (Y < 0) { changeInDirection++; changeInDirection++; } changeInDirection += (Math.abs(X)) / L; if (!(Math.abs(X) % L == 0)) { changeInDirection++; } changeInDirection += (Math.abs(Y)) / L; if (!(Math.abs(Y) % L == 0)) { changeInDirection++; } System.out.println(changeInDirection); } }