import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); int L = sc.nextInt(); sc.close(); int xStep = Math.abs(X)/L; int yStep = Math.abs(Y)/L; if(X%L!=0){ xStep++; } if(Y%L!=0){ yStep++; } int total = yStep + xStep; if(Y<0){ total += 2; }else if(Y>=0&&X==0){ }else{ total += 1; } System.out.println(total); }// mainmethod } // class