import java.util.Scanner; public class Answer { public static void main(String str[]) { Scanner sc = new Scanner(System.in); double x = Double.valueOf(sc.nextLine()); double y = Double.valueOf(sc.nextLine()); double l = Double.valueOf(sc.nextLine()); int operationNum = 0; if(y<0) { operationNum += 2; } if(y == 0){ operationNum += 1; } if(x != 0) { operationNum += 1; } operationNum += Math.abs(Math.ceil(x/l)); operationNum += Math.abs(Math.ceil(y/l)); System.out.println(operationNum); } }