import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int x = Math.abs(Integer.parseInt(br.readLine())); int y = Math.abs(Integer.parseInt(br.readLine())); int l = Integer.parseInt(br.readLine()); int xl = (x + l - 1) / l; int yl = (y + l - 1) / l; System.out.println((xl > 0 && yl > 0) ? xl + yl + 1 : xl + yl); } }