#[allow(unused_imports)]
use std::io::Write;

// {{{
#[allow(unused)]
macro_rules! debug {
    ($($format:tt)*) => (write!(std::io::stderr(), $($format)*).unwrap());
}
#[allow(unused)]
macro_rules! debugln {
    ($($format:tt)*) => (writeln!(std::io::stderr(), $($format)*).unwrap());
}

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
// }}}

fn main() {
    input! {
        n: usize,
        d: isize,
        a: isize,
        monster: [(isize, isize); n],
    }

    let mut monster = monster;
    monster.sort_by(|x, y| (x.0).cmp(&y.0));
    // debugln!("{:?}", monster);

    let mut coords = vec![];
    let mut hp = vec![];
    for &(c, h) in monster.iter() {
        coords.push(c);
        hp.push(h);
    }

    // (location, count)
    let mut atack: Vec<(isize, isize)> = vec![];

    let mut cntsum = vec![0];
    for i in 0..n {
        // 体力を計算してhに入れる
        let leftmost_ind =
            binary_search_vec_min(&atack, |&(location, _)| location >= coords[i] - d);
        let h = match leftmost_ind {
            None => hp[i],
            Some(leftmost) => {
                let lastsum = cntsum.last().unwrap();
                hp[i] - a * (lastsum - cntsum[leftmost])
            }
        };

        if h <= 0 {
            continue;
        }

        let location = coords[i] + d;
        let count = (h + a - 1) / a;
        atack.push((location, count));
        let lastsum = *cntsum.last().unwrap();
        cntsum.push(lastsum + count);
    }

    let ans = cntsum.last().unwrap();
    println!("{}", ans);
}

fn binary_search_vec_min<T, F>(v: &[T], condition: F) -> Option<usize>
where
    F: Fn(&T) -> bool,
{
    if v.is_empty() {
        return None;
    }

    let len = v.len();

    if condition(&v[0]) {
        return Some(0);
    }
    if !condition(&v[len - 1]) {
        return None;
    }

    let mut left = 0;
    let mut right = len - 1;
    while left + 1 < right {
        let mid = (left + right) / 2;
        if condition(&v[mid]) {
            right = mid;
        } else {
            left = mid;
        }
    }

    Some(right)
}


Measured memory_bytes: 24628