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