unittest
{
	assert( [ "3 3 2", "1 2", "5 4", "9 2" ].solve == 2 );
	assert( [ "9 4 1", "1 5", "2 4", "3 3", "4 2", "5 1", "6 2", "7 3", "8 4", "9 5" ].solve == 5 );
	assert( [ "3 0 1", "300000000 1000000000", "100000000 1000000000", "200000000 1000000000" ].solve == 3000000000 );
	
	assert( [ "9 2 2", "1 3", "2 4", "3 3", "4 2", "5 5", "6 2", "7 3", "8 4", "9 5" ].solve == 5 );		// 追加ケース
}



import std.algorithm;
import std.container;
import std.conv;
import std.format;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.solve.writeln;
}

auto solve( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = 0L;
	auto d = 0L;
	auto a = 0L;
	input.front.formattedRead!"%s %s %s"( n, d, a );
	auto xhs = new long[ 2 ][ n ];
	foreach( ref xh; xhs )
	{
		input.popFront;
		xh = input.front.split.to!( long[] );
	}
	xhs.sort;
	
	auto ans = 0L;
	auto t = 0L;
	auto queue = DList!( Tuple!( long, long ) )();
	foreach( xh; xhs )
	{
		while( !queue.empty && queue.front[ 0 ] < xh[ 0 ] )
		{
			t -= queue.front[ 1 ];
			queue.removeFront;
		}
		if( t < xh[ 1 ] )
		{
			auto c = ( xh[ 1 ] - t + a - 1 ) / a;
			ans += c;
			t += a * c;
			queue.insertBack( tuple( xh[ 0 ] + d * 2, a * c ) );
		}
	}
	return ans;
}
