import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner scan = new Scanner(System.in)) { int x = Integer.parseInt(scan.next()); int y = Integer.parseInt(scan.next()); int l = Integer.parseInt(scan.next()); int count = 0; if(y >= 0) { x = Math.abs(x); y = Math.abs(y); count += (y / l); if(y%l > 0) count++; if(x != 0) { count++; count += (x / l); if(x%l > 0) count++; } } else if(y < 0) { x = Math.abs(x); y = Math.abs(y); if(x != 0) { count++; count += (x / l); if(x%l > 0) count++; count++; count += (y / l); if(y%l > 0) count++; } } System.out.println(count); } } }