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

// {{{
#[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: i64,
        a: i64,
        monster: [(i64, i64); n],
    }

    let mut monster = monster;
    monster.sort();

    let mut ans = 0i64;
    // 2分探索で使うため、n + 1まで
    let mut bit = Bit::new(n + 1);
    for i in 0..n {
        let m = monster[i];
        let (x, h) = m;
        let mut h = h;
        h -= bit.sum(i);
        if h <= 0 { continue }
        let num = (h + a - 1) / a;
        // dbg!(i, num, bit.sum(i));
        ans += num;
        let damage = num * a;
        bit.add(i, damage);
        let rx = x + d * 2;

        let mut l = 0;
        let mut r = n;
        while l + 1 < r {
            let mid = (l + r) / 2;
            if monster[mid].0 > rx {
                r = mid;
            } else {
                l = mid;
            }
        }
        let j = r;
        bit.add(j, -damage);
        // dbg!(&bit.v);
    }

    println!("{}", ans);
}

struct Bit {
    n: usize,
    v: Vec<i64>,
}

impl Bit {
    fn new(n: usize) -> Bit {
        let mut m = 1;
        while m < n {
            m *= 2;
        }
        Bit {
            n: n,
            v: vec![0; m],
        }
    }

    fn sum(&self, i: usize) -> i64 {
        let mut i = i + 1;
        let mut ret = 0;
        while i > 0 {
            ret += self.v[i - 1];
            i -= (i as i64 & -(i as i64)) as usize;
        }
        ret
    }

    fn add(&mut self, i: usize, x: i64) {
        let mut i = i + 1;
        while i <= self.n {
            self.v[i - 1] += x;
            i += (i as i64 & -(i as i64)) as usize;
        }
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn bit_test() {
        let mut bit = Bit::new(4);
        assert_eq!(0, bit.sum(3));
        bit.add(3, 1);
        assert_eq!(1, bit.sum(3));
        assert_eq!(0, bit.sum(0));
        bit.add(0, 1);
        assert_eq!(2, bit.sum(3));
        assert_eq!(1, bit.sum(2));
        assert_eq!(1, bit.sum(1));
        assert_eq!(1, bit.sum(0));
    }

    #[test]
    fn bit_test2() {
        let mut bit = Bit::new(3);
        assert_eq!(0, bit.sum(2));
        bit.add(2, 1);
        assert_eq!(1, bit.sum(2));
        assert_eq!(0, bit.sum(0));
        bit.add(0, 1);
        assert_eq!(2, bit.sum(2));
        assert_eq!(1, bit.sum(1));
        assert_eq!(1, bit.sum(0));
    }
}


Measured memory_bytes: 15608