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, count); count += COUNT(X,L,count) + 1; }else{ if(X != 0){ count += COUNT(X,L,count) + 1; count += COUNT(Y,L,count) + 1; } } System.out.println(count); } static int COUNT(int p,int k, int count){ if(p%k == 0){ count = Math.abs(p/k); }else{ count = Math.abs(p/k) + 1; } return count; } }