import java.util.Scanner; public class Answer { public static void main(String str[]) { Scanner sc = new Scanner(System.in); int x = Integer.valueOf(sc.nextLine()); int y = Integer.valueOf(sc.nextLine()); int l = Integer.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((double)x/l)); operationNum += Math.abs(Math.ceil((double)y/l)); System.out.println(operationNum); } }