import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

N,d,a = list(map(int,readline().split()))



data0 = [0]*(N+1)

data1 = [0]*(N+1)

# 区間[l, r)に x を加算

def _add(data, k, x):

    while k <= N:

        data[k] += x

        k += k & -k

def add(l, r, x):

    _add(data0, l, -x*(l-1))

    _add(data0, r, x*(r-1))

    _add(data1, l, x)

    _add(data1, r, -x)



# 区間[l, r)の和を求める

def get(data, k):

    s = 0

    while k:

        s += data[k]

        k -= k & -k

    return s

def query(l, r):

  return get(data1,r-1)*(r-1)+get(data0,r-1)-get(data1,l-1)*(l-1)-get(data0,l-1)



xh = []

for _ in range(N):

    x,h = list(map(int,readline().split()))

    xh.append((x,h))



xh = sorted(xh)

xl = [x for x,h in xh]



for i in range(N):

    add(i+1, i+2, xh[i][1])



import bisect,math



ans = 0

for i in range(N):

    hp = query(i + 1, i + 2)

    #print(data0,data1,hp)    

    if hp > 0:

        count = math.ceil(hp/a)

        ans += count

        damage = count * a

        idx = bisect.bisect_right(xl, xl[i] + 2*d)

        add(i+1, idx+1, -damage)

print(ans)
import sys,bisect

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



def main():

    # 区間加算、上書き、一点取得

    class SegmentTree:

        def __init__(self, n, ele, segfun):

            #####単位元######要設定0or1orinf

            self.ide_ele = ele

            self.segfun = segfun

            ####################

            self.n = n

            self.N0 = 1 << n.bit_length()

            self.data = [self.ide_ele] * (self.N0 * 2)

 

        def update_add(self, l, r, val):

            l += self.N0

            r += self.N0

            while l < r:

                if l & 1:

                    self.data[l] += val

                    l += 1

                if r & 1:

                    self.data[r - 1] += val

                    r -= 1

                l //= 2

                r //= 2

 

        def update(self, l, r, val):

            l += self.N0

            r += self.N0

            while l < r:

                if l & 1:

                    self.data[l] = self.segfun(self.data[l], val)

                    l += 1

                if r & 1:

                    self.data[r - 1] = self.segfun(self.data[r - 1], val)

                    r -= 1

                l //= 2

                r //= 2

 

        def query(self, i):

            i += len(self.data) // 2

            ret = self.data[i]

            while i > 0:

                i //= 2

                ret = self.segfun(ret, self.data[i])

            return ret

 

    N, D, A = list(map(int,readline().split()))

    X = [list(map(int,readline().split())) for _ in range(N)]

    X.sort()

    L = [0]*N

    for i in range(N):

        L[i] = X[i][0]

    S = SegmentTree(N,0,lambda a, b: a+b)

    ans = 0

    for i,[x,h] in enumerate(X):

        H = h - S.query(i)

        if H<=0:

            continue

        ind = bisect.bisect(L,x+2*D)

        need = (H-1)//A + 1

        S.update(i,ind,need*A)

        ans += need

    print(ans)

    return



if __name__ == '__main__':

    main()
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
N, d, a = list(map(int, readline().split()))
data0 = [0] * (N + 1)
data1 = [0] * (N + 1)
# 区間[l, r)に x を加算
def _add(data, k, x):
    while k <= N:
        data[k] += x
        k += k & -k


def add(l, r, x):
    _add(data0, l, -x * (l - 1))
    _add(data0, r, x * (r - 1))
    _add(data1, l, x)
    _add(data1, r, -x)


# 区間[l, r)の和を求める
def get(data, k):
    s = 0
    while k:
        s += data[k]
        k -= k & -k
    return s


def query(l, r):
    return (
        get(data1, r - 1) * (r - 1)
        + get(data0, r - 1)
        - get(data1, l - 1) * (l - 1)
        - get(data0, l - 1)
    )


xh = []
for _ in range(N):
    x, h = list(map(int, readline().split()))
    xh.append((x, h))
xh = sorted(xh)
xl = [x for x, h in xh]
for i in range(N):
    add(i + 1, i + 2, xh[i][1])
import bisect, math

ans = 0
for i in range(N):
    hp = query(i + 1, i + 2)
    # print(data0,data1,hp)
    if hp > 0:
        count = math.ceil(hp / a)
        ans += count
        damage = count * a
        idx = bisect.bisect_right(xl, xl[i] + 2 * d)
        add(i + 1, idx + 1, -damage)
print(ans)

import sys, bisect

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def main():
    # 区間加算、上書き、一点取得
    class SegmentTree:
        def __init__(self, n, ele, segfun):
            #####単位元######要設定0or1orinf
            self.ide_ele = ele
            self.segfun = segfun
            ####################
            self.n = n
            self.N0 = 1 << n.bit_length()
            self.data = [self.ide_ele] * (self.N0 * 2)

        def update_add(self, l, r, val):
            l += self.N0
            r += self.N0
            while l < r:
                if l & 1:
                    self.data[l] += val
                    l += 1
                if r & 1:
                    self.data[r - 1] += val
                    r -= 1
                l //= 2
                r //= 2

        def update(self, l, r, val):
            l += self.N0
            r += self.N0
            while l < r:
                if l & 1:
                    self.data[l] = self.segfun(self.data[l], val)
                    l += 1
                if r & 1:
                    self.data[r - 1] = self.segfun(self.data[r - 1], val)
                    r -= 1
                l //= 2
                r //= 2

        def query(self, i):
            i += len(self.data) // 2
            ret = self.data[i]
            while i > 0:
                i //= 2
                ret = self.segfun(ret, self.data[i])
            return ret

    N, D, A = list(map(int, readline().split()))
    X = [list(map(int, readline().split())) for _ in range(N)]
    X.sort()
    L = [0] * N
    for i in range(N):
        L[i] = X[i][0]
    S = SegmentTree(N, 0, lambda a, b: a + b)
    ans = 0
    for i, [x, h] in enumerate(X):
        H = h - S.query(i)
        if H <= 0:
            continue
        ind = bisect.bisect(L, x + 2 * D)
        need = (H - 1) // A + 1
        S.update(i, ind, need * A)
        ans += need
    print(ans)
    return


if __name__ == "__main__":
    main()

-import sys +import sys, bisect -N, d, a = list(map(int, readline().split())) -data0 = [0] * (N + 1) -data1 = [0] * (N + 1) -# 区間[l, r)に x を加算 -def _add(data, k, x): -    while k <= N: -        data[k] += x -        k += k & -k +readlines = sys.stdin.buffer.readlines -def add(l, r, x): -    _add(data0, l, -x * (l - 1)) -    _add(data0, r, x * (r - 1)) -    _add(data1, l, x) -    _add(data1, r, -x) +def main(): +    # 区間加算、上書き、一点取得 +    class SegmentTree: +        def __init__(self, n, ele, segfun): +            #####単位元######要設定0or1orinf +            self.ide_ele = ele +            self.segfun = segfun +            #################### +            self.n = n +            self.N0 = 1 << n.bit_length() +            self.data = [self.ide_ele] * (self.N0 * 2) + +        def update_add(self, l, r, val): +            l += self.N0 +            r += self.N0 +            while l < r: +                if l & 1: +                    self.data[l] += val +                    l += 1 +                if r & 1: +                    self.data[r - 1] += val +                    r -= 1 +                l //= 2 +                r //= 2 + +        def update(self, l, r, val): +            l += self.N0 +            r += self.N0 +            while l < r: +                if l & 1: +                    self.data[l] = self.segfun(self.data[l], val) +                    l += 1 +                if r & 1: +                    self.data[r - 1] = self.segfun(self.data[r - 1], val) +                    r -= 1 +                l //= 2 +                r //= 2 + +        def query(self, i): +            i += len(self.data) // 2 +            ret = self.data[i] +            while i > 0: +                i //= 2 +                ret = self.segfun(ret, self.data[i]) +            return ret + +    N, D, A = list(map(int, readline().split())) +    X = [list(map(int, readline().split())) for _ in range(N)] +    X.sort() +    L = [0] * N +    for i in range(N): +        L[i] = X[i][0] +    S = SegmentTree(N, 0, lambda a, b: a + b) +    ans = 0 +    for i, [x, h] in enumerate(X): +        H = h - S.query(i) +        if H <= 0: +            continue +        ind = bisect.bisect(L, x + 2 * D) +        need = (H - 1) // A + 1 +        S.update(i, ind, need * A) +        ans += need +    print(ans) +    return -# 区間[l, r)の和を求める -def get(data, k): -    s = 0 -    while k: -        s += data[k] -        k -= k & -k -    return s - - -def query(l, r): -    return ( -        get(data1, r - 1) * (r - 1) -        + get(data0, r - 1) -        - get(data1, l - 1) * (l - 1) -        - get(data0, l - 1) -    ) - - -xh = [] -for _ in range(N): -    x, h = list(map(int, readline().split())) -    xh.append((x, h)) -xh = sorted(xh) -xl = [x for x, h in xh] -for i in range(N): -    add(i + 1, i + 2, xh[i][1]) -import bisect, math - -ans = 0 -for i in range(N): -    hp = query(i + 1, i + 2) -    # print(data0,data1,hp) -    if hp > 0: -        count = math.ceil(hp / a) -        ans += count -        damage = count * a -        idx = bisect.bisect_right(xl, xl[i] + 2 * d) -        add(i + 1, idx + 1, -damage) -print(ans) +if __name__ == "__main__": +    main()