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()); count += Math.abs(X)/L; if(X%L!= 0) count++; count += Math.abs(Y)/L; if(Y%L!=0) count++; if(Y<0) count += 2; if(X!=0) count++; System.out.println(count); } catch (IOException e) { e.printStackTrace(); } } }