package yukicoder.No48; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = Integer.parseInt(sc.next()); int Y = Integer.parseInt(sc.next()); int L = Integer.parseInt(sc.next()); int sum = 0; if (Y > 0) { sum += (Y / L); if (Y % L != 0) sum++; } else { sum += 2; Y = -Y; sum += (Y / L); if (Y % L != 0) sum++; } if (X != 0) { sum++; X = Math.abs(X); sum += (X / L); if (X % L != 0) sum++; } System.out.println(sum); } }