import java.util.Scanner; public class Main{ public static void main(String args[])throws Exception{ Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); int L = sc.nextInt(); X = Math.abs(X); int ans = 0; if(Y>0){ ans += (Y-1)/L+1; if(X>0){ ans += (X-1)/L+2; } }else if(Y<0){ ans += 2; Y = Math.abs(Y); if(X>0){ ans += (X-1)/L+1; } ans += (Y-1)/L+1; }else{ if(X>0){ ans += (X-1)/L+2; } } System.out.println(ans); } }