import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int X = Integer.parseInt(reader.readLine()); int Y = Integer.parseInt(reader.readLine()); int L = Integer.parseInt(reader.readLine()); int minimumCommandCounter = 0; if(X!=0) { minimumCommandCounter = 1; } if (Y < 0) { minimumCommandCounter = 2; } X = Math.abs(X); Y = Math.abs(Y); minimumCommandCounter += (X + L - 1) / L; minimumCommandCounter += (Y + L - 1) / L; System.out.println(minimumCommandCounter); } }