import java.util.Scanner; public class No48 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int l = sc.nextInt(); int cnt = 0; int xMove = Math.abs(x / l); if (x % l != 0) xMove++; cnt += xMove; int yMove = Math.abs(y / l); if (y % l != 0) yMove++; cnt += yMove; if (x != 0 && y >= 0) { cnt++; } if (y < 0) { cnt += 2; } System.out.println(cnt); sc.close(); } }