program silver_fox_vs_monster
  implicit none
  integer(8), parameter :: inf = 1001001001001_8
  integer :: n, i, l, r, m
  integer(8) :: d, a, x(0:200001,2) = 0, y(0:200001,2) = 0, p1 = 0, p2 = 0, t
  read(*,*) n, d, a
  do i = 1, n
    read(*,*) x(i,:)
  end do
  call merge_sort(x(1:n,:))
  x(0,1) = -inf
  x(n+1,1) = inf
  y = x
  i = 1
  do while (i <= n)
    do while (x(i,2) <= 0 .and. i <= n)
      i = i+1
    end do
    if (i > n) exit
    l = i
    r = n+1
    do while (r-l > 1)
      m = (l+r)/2
      if (x(m,1) > x(i,1)+d*2) then
        r = m
      else
        l = m
      end if
    end do
    t = (x(i,2)+a-1)/a
    p1 = p1+t
    x(i:l,2) = x(i:l,2)-t*a
  end do
  x = y
  i = n
  do while (i >= 1)
    do while (x(i,2) <= 0 .and. i >= 1)
      i = i-1
    end do
    if (i < 1) exit
    l = 0
    r = i
    do while (r-l > 1)
      m = (l+r)/2
      if (x(m,1) < x(i,1)-d*2) then
        l = m
      else
        r = m
      end if
    end do
    t = (x(i,2)+a-1)/a
    p2 = p2+t
    x(r:i,2) = x(r:i,2)-t*a
  end do
  write(*,'(i0)') min(p1,p2)
contains
  subroutine merge_sort(a)
    integer(8), intent(inout) :: a(:,:)
    integer :: n, m, l, i, u
    n = size(a,1)
    m = n
    l = 1
    do while (m > 1)
      do i = 1, m/2
        u = min(2*i*l,n)
        call merger(a(2*(i-1)*l+1:(2*i-1)*l,:),a((2*i-1)*l+1:u,:))
      end do
      l = 2*l
      m = (m+1)/2
    end do
  end
  subroutine merger(a1,a2)
    integer(8), intent(inout) :: a1(:,:), a2(:,:)
    integer(8) :: a(size(a1,1)+size(a2,1),size(a1,2))
    integer :: i1, i2, n1, n2
    i1 = 1
    i2 = 1
    n1 = size(a1,1)
    n2 = size(a2,1)
    do while (i1 <= n1 .and. i2 <= n2)
      if (a1(i1,1) < a2(i2,1)) then
        a(i1+i2-1,:) = a1(i1,:)
        i1 = i1+1
      else
        a(i1+i2-1,:) = a2(i2,:)
        i2 = i2+1
       end if
    end do
    if (i1 <= n1) then
      a(i1+i2-1:n1+n2,:) = a1(i1:n1,:)
    else
      a(i1+i2-1:n1+n2,:) = a2(i2:n2,:)
    end if
    a1 = a(1:n1,:)
    a2 = a(n1+1:n1+n2,:)
  end
end program silver_fox_vs_monster