import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) { BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in)); String line = ""; int count=0; try { int X = Integer.parseInt(stdReader.readLine()); int Y = Integer.parseInt(stdReader.readLine()); int L = Integer.parseInt(stdReader.readLine()); if(X!=0) count++; count += Math.abs(X)/L; if(Math.abs(X)%L!= 0) count++; count += Math.abs(Y)/L; if(Math.abs(Y)%L!=0) count++; if(Y<0){ if(X !=0){ count++; }else{ count += 2; } } System.out.println(count); } catch (IOException e) { e.printStackTrace(); } } }