import java.util.Scanner; public class No48 { public static void main(String[]args) { Scanner sc =new Scanner(System.in); int X,Y,L,cnt; X = sc.nextInt(); Y = sc.nextInt(); L = sc.nextInt(); cnt=0; if(Y>=0) { while(Y>0) { Y=Y-L; cnt++; } if(X>0) { cnt++; while(X>0) { X=X-L; cnt++; } } else if(X<0){ cnt++; X=(-1)*X; while(X>0) { X=X-L; cnt++; } } } else { Y=(-1)*Y; while(Y>0) { Y=Y-L; cnt++; } if(X>0) { cnt+=2; while(X>0) { X=X-L; cnt++; } } else { cnt+=2; X=(-1)*X; while(X>0) { X=X-L; cnt++; } } } System.out.println(cnt); } }