import java.util.Scanner; public class Main2 { 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) count+=2; else if(y >= 0 && x != 0) count++; count += (Math.abs(y)/l) + (Math.abs(y)%l>0? 1:0); count += (Math.abs(x)/l) + (Math.abs(x)%l>0? 1:0); System.out.println(count); } } }