import java.util.Scanner; class Test { public static void main(String[] args) throws Exception { Scanner in = new Scanner(System.in); int x = in.nextInt(); int y = in.nextInt(); int l = in.nextInt(); int ans = 0; if((x != 0) && (y >= 0)) { ans++; } else if(y < 0) { ans += 2; } x = Math.abs(x); y = Math.abs(y); ans += (x + l - 1) / l; ans += (y + l - 1) / l; System.out.println(ans); } }