void main()
{
    long[] nda = rdRow;
    long n = nda[0], d = nda[1], a = nda[2];
    long[] x = new long[n], h = new long[n];
    foreach (i; 0 .. n)
    {
        long[] tmp = rdRow;
        x[i] = tmp[0], h[i] = tmp[1];
    }

    zip(x, h).sort!((u, v) => u[0] < v[0]);
    Info[] bomb;
    long damage;
    long result;
    foreach (i; 0 .. n)
    {
        while (!bomb.empty && bomb[0].x + d < x[i])
        {
            damage -= bomb[0].h;
            bomb.popFront;
        }
        h[i] -= damage;
        if (h[i] > 0)
        {
            long cnt = (h[i] + a - 1) / a;
            result += cnt;
            damage += a * cnt;
            bomb ~= Info(x[i]+d, a*cnt);
        }
    }

    result.writeln;
}

struct Info
{
    long x, h;
}

T rdElem(T = long)()
if (!is(T == struct))
{
    return readln.chomp.to!T;
}

alias rdStr = rdElem!string;
alias rdDchar = rdElem!(dchar[]);

T rdElem(T)()
if (is(T == struct))
{
    T result;
    string[] input = rdRow!string;
    assert(T.tupleof.length == input.length);
    foreach (i, ref x; result.tupleof)
    {
        x = input[i].to!(typeof(x));
    }
    return result;
}

T[] rdRow(T = long)()
{
    return readln.split.to!(T[]);
}

T[] rdCol(T = long)(long col)
{
    return iota(col).map!(x => rdElem!T).array;
}

T[][] rdMat(T = long)(long col)
{
    return iota(col).map!(x => rdRow!T).array;
}

void wrMat(T = long)(T[][] mat)
{
    foreach (row; mat)
    {
        foreach (j, compo; row)
        {
            compo.write;
            if (j == row.length - 1) writeln;
            else " ".write;
        }
    }
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.traits;
import std.container;
import std.functional;
import std.typecons;
import std.ascii;
import std.uni;