# -*- coding: utf-8 -*-



import sys

from bisect import bisect_right



def input(): return sys.stdin.readline().strip()

def list2d(a, b, c): return [[c] * b for i in range(a)]

def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1): return int(-(-x // y))

def INT(): return int(eval(input()))

def MAP(): return list(map(int, input().split()))

def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes(): print('Yes')

def No(): print('No')

def YES(): print('YES')

def NO(): print('NO')

sys.setrecursionlimit(10 ** 9)

INF = 10 ** 18

MOD = 10 ** 9 + 7



class StarrySkyTree:

    """ Starry Sky Tree(区間加算・区間最小(大)値取得) """



    def __init__(self, N, func, intv):

        self.intv = intv

        self.func = func

        LV = (N-1).bit_length()

        self.N0 = 2**LV

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

        self.lazy = [0]*(2*self.N0)



    # 伝搬される区間のインデックス(1-indexed)を全て列挙するgenerator

    def gindex(self, l, r):

        L = l + self.N0; R = r + self.N0

        lm = (L // (L & -L)) >> 1

        rm = (R // (R & -R)) >> 1

        while L < R:

            if R <= rm:

                yield R

            if L <= lm:

                yield L

            L >>= 1; R >>= 1

        while L:

            yield L

            L >>= 1



    # 遅延評価の伝搬処理

    def propagates(self, *ids):

        # 1-indexedで単調増加のインデックスリスト

        for i in reversed(ids):

            v = self.lazy[i-1]

            if not v:

                continue

            self.lazy[2*i-1] += v; self.lazy[2*i] += v

            self.data[2*i-1] += v; self.data[2*i] += v

            self.lazy[i-1] = 0



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

        """ 区間[l,r)の値にxを加算 """



        # 1. lazyの値は伝搬させない

        # 2. 区間[l,r)のdata, lazyの値を更新

        L = self.N0 + l; R = self.N0 + r

        while L < R:

            if R & 1:

                R -= 1

                self.lazy[R-1] += x; self.data[R-1] += x

            if L & 1:

                self.lazy[L-1] += x; self.data[L-1] += x

                L += 1

            L >>= 1; R >>= 1

        # 3. 更新される区間を部分的に含んだ区間のdataの値を更新 (lazyの値を考慮)

        for i in self.gindex(l, r):

            self.data[i-1] = self.func(self.data[2*i-1], self.data[2*i]) + self.lazy[i-1]



    def query(self, l, r):

        """ 区間[l,r)の最小(大)値を取得 """



        # 1. トップダウンにlazyの値を伝搬

        self.propagates(*self.gindex(l, r))

        L = self.N0 + l; R = self.N0 + r



        # 2. 区間[l, r)の最小(大)値を求める

        s = self.intv

        while L < R:

            if R & 1:

                R -= 1

                s = self.func(s, self.data[R-1])

            if L & 1:

                s = self.func(s, self.data[L-1])

                L += 1

            L >>= 1; R >>= 1

        return s



N, D, K = MAP()



XH = []

for i in range(N):

    x, h = MAP()

    XH.append((x, h))



XH.sort()

X, H = list(zip(*XH))

D = D * 2



sst = StarrySkyTree(N, max, 0)

ans = 0

for i, (x, h) in enumerate(XH):

    h -= sst.query(i, i+1) * K

    if h <= 0:

        continue

    cnt = ceil(h, K)

    idx = bisect_right(X, x+D) - 1

    sst.update(i, idx+1, cnt)

    ans += cnt

print(ans)

# -*- coding: utf-8 -*-



import sys

from bisect import bisect_right



def input(): return sys.stdin.readline().strip()

def list2d(a, b, c): return [[c] * b for i in range(a)]

def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1): return int(-(-x // y))

def INT(): return int(input())

def MAP(): return map(int, input().split())

def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes(): print('Yes')

def No(): print('No')

def YES(): print('YES')

def NO(): print('NO')

sys.setrecursionlimit(10 ** 9)

INF = 10 ** 18

MOD = 10 ** 9 + 7



class BIT2:

    """ 区間加算BIT(区間加算・区間合計取得) """



    def __init__(self, N):

        # 添字0が使えないので、内部的には全て1-indexedとして扱う

        N += 1

        self.N = N

        self.data0 = [0] * N

        self.data1 = [0] * N



    def _add(self, data, k, x):

        k += 1

        while k < self.N:

            data[k] += x

            k += k & -k



    def _get(self, data, k):

        k += 1

        s = 0

        while k:

            s += data[k]

            k -= k & -k

        return s



    def add(self, l, r, x):

        """ 区間[l,r)に値xを追加 """



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

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

        self._add(self.data1, l, x)

        self._add(self.data1, r, -x)



    def query(self, l, r):

        """ 区間[l,r)の和を取得 """



        return self._get(self.data1, r-1) * (r-1) + self._get(self.data0, r-1) \

             - self._get(self.data1, l-1) * (l-1) - self._get(self.data0, l-1)



N, D, K = MAP()



XH = []

for i in range(N):

    x, h = MAP()

    XH.append((x, h))



XH.sort()

X, H = zip(*XH)

D = D * 2



bit = BIT2(N)

ans = 0

for i, (x, h) in enumerate(XH):

    h -= bit.query(i, i+1) * K

    if h <= 0:

        continue

    cnt = ceil(h, K)

    idx = bisect_right(X, x+D) - 1

    bit.add(i, idx+1, cnt)

    ans += cnt

print(ans)

# -*- coding: utf-8 -*-
import sys
from bisect import bisect_right


def input():
    return sys.stdin.readline().strip()


def list2d(a, b, c):
    return [[c] * b for i in range(a)]


def list3d(a, b, c, d):
    return [[[d] * c for j in range(b)] for i in range(a)]


def list4d(a, b, c, d, e):
    return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]


def ceil(x, y=1):
    return int(-(-x // y))


def INT():
    return int(eval(input()))


def MAP():
    return list(map(int, input().split()))


def LIST(N=None):
    return list(MAP()) if N is None else [INT() for i in range(N)]


def Yes():
    print("Yes")


def No():
    print("No")


def YES():
    print("YES")


def NO():
    print("NO")


sys.setrecursionlimit(10**9)
INF = 10**18
MOD = 10**9 + 7


class StarrySkyTree:
    """Starry Sky Tree(区間加算・区間最小(大)値取得)"""

    def __init__(self, N, func, intv):
        self.intv = intv
        self.func = func
        LV = (N - 1).bit_length()
        self.N0 = 2**LV
        self.data = [0] * (2 * self.N0)
        self.lazy = [0] * (2 * self.N0)

    # 伝搬される区間のインデックス(1-indexed)を全て列挙するgenerator
    def gindex(self, l, r):
        L = l + self.N0
        R = r + self.N0
        lm = (L // (L & -L)) >> 1
        rm = (R // (R & -R)) >> 1
        while L < R:
            if R <= rm:
                yield R
            if L <= lm:
                yield L
            L >>= 1
            R >>= 1
        while L:
            yield L
            L >>= 1

    # 遅延評価の伝搬処理
    def propagates(self, *ids):
        # 1-indexedで単調増加のインデックスリスト
        for i in reversed(ids):
            v = self.lazy[i - 1]
            if not v:
                continue
            self.lazy[2 * i - 1] += v
            self.lazy[2 * i] += v
            self.data[2 * i - 1] += v
            self.data[2 * i] += v
            self.lazy[i - 1] = 0

    def update(self, l, r, x):
        """区間[l,r)の値にxを加算"""
        # 1. lazyの値は伝搬させない
        # 2. 区間[l,r)のdata, lazyの値を更新
        L = self.N0 + l
        R = self.N0 + r
        while L < R:
            if R & 1:
                R -= 1
                self.lazy[R - 1] += x
                self.data[R - 1] += x
            if L & 1:
                self.lazy[L - 1] += x
                self.data[L - 1] += x
                L += 1
            L >>= 1
            R >>= 1
        # 3. 更新される区間を部分的に含んだ区間のdataの値を更新 (lazyの値を考慮)
        for i in self.gindex(l, r):
            self.data[i - 1] = (
                self.func(self.data[2 * i - 1], self.data[2 * i]) + self.lazy[i - 1]
            )

    def query(self, l, r):
        """区間[l,r)の最小(大)値を取得"""
        # 1. トップダウンにlazyの値を伝搬
        self.propagates(*self.gindex(l, r))
        L = self.N0 + l
        R = self.N0 + r
        # 2. 区間[l, r)の最小(大)値を求める
        s = self.intv
        while L < R:
            if R & 1:
                R -= 1
                s = self.func(s, self.data[R - 1])
            if L & 1:
                s = self.func(s, self.data[L - 1])
                L += 1
            L >>= 1
            R >>= 1
        return s


N, D, K = MAP()
XH = []
for i in range(N):
    x, h = MAP()
    XH.append((x, h))
XH.sort()
X, H = list(zip(*XH))
D = D * 2
sst = StarrySkyTree(N, max, 0)
ans = 0
for i, (x, h) in enumerate(XH):
    h -= sst.query(i, i + 1) * K
    if h <= 0:
        continue
    cnt = ceil(h, K)
    idx = bisect_right(X, x + D) - 1
    sst.update(i, idx + 1, cnt)
    ans += cnt
print(ans)

# -*- coding: utf-8 -*-
import sys
from bisect import bisect_right


def input():
    return sys.stdin.readline().strip()


def list2d(a, b, c):
    return [[c] * b for i in range(a)]


def list3d(a, b, c, d):
    return [[[d] * c for j in range(b)] for i in range(a)]


def list4d(a, b, c, d, e):
    return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]


def ceil(x, y=1):
    return int(-(-x // y))


def INT():
    return int(input())


def MAP():
    return map(int, input().split())


def LIST(N=None):
    return list(MAP()) if N is None else [INT() for i in range(N)]


def Yes():
    print("Yes")


def No():
    print("No")


def YES():
    print("YES")


def NO():
    print("NO")


sys.setrecursionlimit(10**9)
INF = 10**18
MOD = 10**9 + 7


class BIT2:
    """区間加算BIT(区間加算・区間合計取得)"""

    def __init__(self, N):
        # 添字0が使えないので、内部的には全て1-indexedとして扱う
        N += 1
        self.N = N
        self.data0 = [0] * N
        self.data1 = [0] * N

    def _add(self, data, k, x):
        k += 1
        while k < self.N:
            data[k] += x
            k += k & -k

    def _get(self, data, k):
        k += 1
        s = 0
        while k:
            s += data[k]
            k -= k & -k
        return s

    def add(self, l, r, x):
        """区間[l,r)に値xを追加"""
        self._add(self.data0, l, -x * (l - 1))
        self._add(self.data0, r, x * (r - 1))
        self._add(self.data1, l, x)
        self._add(self.data1, r, -x)

    def query(self, l, r):
        """区間[l,r)の和を取得"""
        return (
            self._get(self.data1, r - 1) * (r - 1)
            + self._get(self.data0, r - 1)
            - self._get(self.data1, l - 1) * (l - 1)
            - self._get(self.data0, l - 1)
        )


N, D, K = MAP()
XH = []
for i in range(N):
    x, h = MAP()
    XH.append((x, h))
XH.sort()
X, H = zip(*XH)
D = D * 2
bit = BIT2(N)
ans = 0
for i, (x, h) in enumerate(XH):
    h -= bit.query(i, i + 1) * K
    if h <= 0:
        continue
    cnt = ceil(h, K)
    idx = bisect_right(X, x + D) - 1
    bit.add(i, idx + 1, cnt)
    ans += cnt
print(ans)

-    return int(eval(input())) +    return int(input()) -    return list(map(int, input().split())) +    return map(int, input().split()) -class StarrySkyTree: -    """Starry Sky Tree(区間加算・区間最小(大)値取得)""" +class BIT2: +    """区間加算BIT(区間加算・区間合計取得)""" -    def __init__(self, N, func, intv): -        self.intv = intv -        self.func = func -        LV = (N - 1).bit_length() -        self.N0 = 2**LV -        self.data = [0] * (2 * self.N0) -        self.lazy = [0] * (2 * self.N0) +    def __init__(self, N): +        # 添字0が使えないので、内部的には全て1-indexedとして扱う +        N += 1 +        self.N = N +        self.data0 = [0] * N +        self.data1 = [0] * N -    # 伝搬される区間のインデックス(1-indexed)を全て列挙するgenerator -    def gindex(self, l, r): -        L = l + self.N0 -        R = r + self.N0 -        lm = (L // (L & -L)) >> 1 -        rm = (R // (R & -R)) >> 1 -        while L < R: -            if R <= rm: -                yield R -            if L <= lm: -                yield L -            L >>= 1 -            R >>= 1 -        while L: -            yield L -            L >>= 1 +    def _add(self, data, k, x): +        k += 1 +        while k < self.N: +            data[k] += x +            k += k & -k -    # 遅延評価の伝搬処理 -    def propagates(self, *ids): -        # 1-indexedで単調増加のインデックスリスト -        for i in reversed(ids): -            v = self.lazy[i - 1] -            if not v: -                continue -            self.lazy[2 * i - 1] += v -            self.lazy[2 * i] += v -            self.data[2 * i - 1] += v -            self.data[2 * i] += v -            self.lazy[i - 1] = 0 +    def _get(self, data, k): +        k += 1 +        s = 0 +        while k: +            s += data[k] +            k -= k & -k +        return s -    def update(self, l, r, x): -        """区間[l,r)の値にxを加算""" -        # 1. lazyの値は伝搬させない -        # 2. 区間[l,r)のdata, lazyの値を更新 -        L = self.N0 + l -        R = self.N0 + r -        while L < R: -            if R & 1: -                R -= 1 -                self.lazy[R - 1] += x -                self.data[R - 1] += x -            if L & 1: -                self.lazy[L - 1] += x -                self.data[L - 1] += x -                L += 1 -            L >>= 1 -            R >>= 1 -        # 3. 更新される区間を部分的に含んだ区間のdataの値を更新 (lazyの値を考慮) -        for i in self.gindex(l, r): -            self.data[i - 1] = ( -                self.func(self.data[2 * i - 1], self.data[2 * i]) + self.lazy[i - 1] -            ) +    def add(self, l, r, x): +        """区間[l,r)に値xを追加""" +        self._add(self.data0, l, -x * (l - 1)) +        self._add(self.data0, r, x * (r - 1)) +        self._add(self.data1, l, x) +        self._add(self.data1, r, -x) -        """区間[l,r)の最小(大)値を取得""" -        # 1. トップダウンにlazyの値を伝搬 -        self.propagates(*self.gindex(l, r)) -        L = self.N0 + l -        R = self.N0 + r -        # 2. 区間[l, r)の最小(大)値を求める -        s = self.intv -        while L < R: -            if R & 1: -                R -= 1 -                s = self.func(s, self.data[R - 1]) -            if L & 1: -                s = self.func(s, self.data[L - 1]) -                L += 1 -            L >>= 1 -            R >>= 1 -        return s +        """区間[l,r)の和を取得""" +        return ( +            self._get(self.data1, r - 1) * (r - 1) +            + self._get(self.data0, r - 1) +            - self._get(self.data1, l - 1) * (l - 1) +            - self._get(self.data0, l - 1) +        ) -X, H = list(zip(*XH)) +X, H = zip(*XH) -sst = StarrySkyTree(N, max, 0) +bit = BIT2(N) -    h -= sst.query(i, i + 1) * K +    h -= bit.query(i, i + 1) * K -    sst.update(i, idx + 1, cnt) +    bit.add(i, idx + 1, cnt)