let rec upper_bound l r p =
  if r <= 1 + l
  then l
  else let m = (l + r) / 2 in
       if p m 
       then upper_bound m r p
       else upper_bound l m p

let () = Scanf.scanf "%d %d %d\n" @@ fun n d a ->
  let xhs = Array.init (n + 1) @@ function
    | 0 -> (max_int, 0)
    | _ -> Scanf.scanf "%d %d\n" @@ fun x h -> x, h in
  Array.sort (fun (x, _) (x', _) -> compare x x') xhs;
  let cost = ref 0 in
  let acc = Array.make (n + 1) 0 in
  let bomb = Array.make (n + 1) 0 in
  for i = 0 to n - 1 do
    let (x, h) = xhs.(i) in
    if acc.(i) + bomb.(i) * a < h then begin
      let j = upper_bound i (n + 1) @@ fun j -> fst xhs.(j) <= x + 2 * d in
      let x = (h - (acc.(i) + bomb.(i) * a) + a - 1) / a in
      cost := !cost + x;
      bomb.(i) <- bomb.(i) + x;
      bomb.(j + 1) <- bomb.(j + 1) - x;
    end;
    acc.(i + 1) <- acc.(i) + bomb.(i) * a;
  done;
  Printf.printf "%d\n" !cost
