import java.util.Scanner; public class No48 { public static void main (String[] args){ Scanner sc =new Scanner(System.in); int x=sc.nextInt(); int y=sc.nextInt(); int l=sc.nextInt(); System.out.println((x!=0?Math.abs(x/l)+1:0)+(y==0?0:y>0?y/l:Math.abs(y/l)+2)+(x%l==0?0:1)+(y%l==0?0:1)-(x!=0&&y<0?1:0)); } }