import java.util.Scanner; public class Robot2 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double x = scanner.nextInt(); double y = scanner.nextInt(); double l = scanner.nextInt(); double count = 0; //回転 if(y<0){ count++; } if(x != 0){ count++; } x = Math.abs(x); y = Math.abs(y); //進む回数 -> 距離 / L (切り上げ) count += Math.ceil(x/l) + Math.ceil(y/l); System.out.println((int)count); } }