import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x = scan.nextInt(); int y = scan.nextInt(); int l = scan.nextInt(); int c = (int)(Math.ceil(Math.abs(x) / (double)l) + Math.ceil(Math.abs(y) / (double)l)); if (y < 0) { c += 2; } else if (x != 0) { c += 1; } System.out.println(c); scan.close(); } }