package benkyoukai; import java.util.Scanner; public class Robot { public static void main(String[] args) { int x, y, l; int ans=0; Scanner sc = new Scanner(System.in); x = sc.nextInt(); y = sc.nextInt(); l = sc.nextInt(); x=Math.abs(x); if(y==0){ if(x==0){ ans = 0; }else{ ans = (x + l -1)/l+1; } } if(y>0){ ans = (y+l-1)/l; if(x!=0){ ans +=1+(x+l-1)/l; } } if(y<0){ ans = (-y+l-1)/l; if(x==0){ ans +=2; }else{ ans +=(2+(x+l-1)/l); } } System.out.println(ans); } }