import java.util.*; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); int x=sc.nextInt(); int y=sc.nextInt(); int step=sc.nextInt(); int count=0; int abs_x=Math.abs(x); int abs_y=Math.abs(y); if(y>0){ while(y>step){ y-=step; count++; } count++; if(x!=0){ count++; while(abs_x>step){ abs_x-=step; count++; } count++; }else{ ; } }else if(y==0){ if(x!=0){ count++; while(abs_x>step){ abs_x-=step; count++; } count++; }else{ ; } }else{ if(x!=0){ count++; while(abs_x>step){ abs_x-=step; count++; } count++; }else{ count++; } count++; while(abs_y>step){ abs_y-=step; count++; } count++; } System.out.println(count); } }