import java.util.Scanner; public class Robo { public static void main(String[] args) { Scanner s = new Scanner(System.in); int X = s.nextInt(), Y = s.nextInt(), L = s.nextInt(), count = 0; s.close(); if(Y >= 0){ count += COUNT(Y, L); if(X != 0){ count += COUNT(X,L) + 1; } }else{ count += 2; if(X == 0){ count += COUNT(Y,L); }else{ count += COUNT(X,L); count += COUNT(Y,L); } } System.out.println(count); } static int COUNT(int p,int k){ if(p%k == 0){ return Math.abs(p/k); }else{ return Math.abs(p/k) + 1; } } }