Vasya has recently got a job as a cashier at a local store. His day at work is L minutes long. Vasya has already memorized n regular customers, the i-th of which comes after t_{i} minutes after the beginning of the day, and his service consumes l_{i} minutes. It is guaranteed that no customer will arrive while Vasya is servicing another customer. 

Vasya is a bit lazy, so he likes taking smoke breaks for a minutes each. Those breaks may go one after another, but Vasya must be present at work during all the time periods he must serve regular customers, otherwise one of them may alert his boss. What is the maximum number of breaks Vasya can take during the day?

Input

The first line contains three integers n, L and a (0 ≤ n ≤ 10^{5}, 1 ≤ L ≤ 10^{9}, 1 ≤ a ≤ L).

The i-th of the next n lines contains two integers t_{i} and l_{i} (0 ≤ t_{i} ≤ L - 1, 1 ≤ l_{i} ≤ L). It is guaranteed that t_{i} + l_{i} ≤ t_{i + 1} and t_{n} + l_{n} ≤ L.

Output

Output one integer — the maximum number of breaks.

Examples

Input

2 11 3
0 1
1 1


Output

3

Input

0 5 2


Output

2

Input

1 3 2
1 2


Output

0

Note

In the first sample Vasya can take 3 breaks starting after 2, 5 and 8 minutes after the beginning of the day.

In the second sample Vasya can take 2 breaks starting after 0 and 2 minutes after the beginning of the day.

In the third sample Vasya can't take any breaks.
import java.io.*;
import java.util.*;
import java.math.*;

public class Solution {
    /*
      InputReader class taken from https://gist.github.com/o-panda-o/32ce63499c05192827294eb529cc4fd0
      Which is publically available
    */
	static class InputReader {
    private boolean finished = false;

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1) {
            throw new InputMismatchException();
        }
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0) {
                return -1;
            }
        }
        return buf[curChar++];
    }

    public int peek() {
        if (numChars == -1) {
            return -1;
        }
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                return -1;
            }
            if (numChars <= 0) {
                return -1;
            }
        }
        return buf[curChar];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9') {
                throw new InputMismatchException();
            }
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long nextLong() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9') {
                throw new InputMismatchException();
            }
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public String nextString() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        StringBuilder res = new StringBuilder();
        do {
            if (Character.isValidCodePoint(c)) {
                res.appendCodePoint(c);
            }
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    public boolean isSpaceChar(int c) {
        if (filter != null) {
            return filter.isSpaceChar(c);
        }
        return isWhitespace(c);
    }

    public static boolean isWhitespace(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private String readLine0() {
        StringBuilder buf = new StringBuilder();
        int c = read();
        while (c != '\n' && c != -1) {
            if (c != '\r') {
                buf.appendCodePoint(c);
            }
            c = read();
        }
        return buf.toString();
    }

    public String readLine() {
        String s = readLine0();
        while (s.trim().length() == 0) {
            s = readLine0();
        }
        return s;
    }

    public String readLine(boolean ignoreEmptyLines) {
        if (ignoreEmptyLines) {
            return readLine();
        } else {
            return readLine0();
        }
    }

    public BigInteger readBigInteger() {
        try {
            return new BigInteger(nextString());
        } catch (NumberFormatException e) {
            throw new InputMismatchException();
        }
    }

    public char nextCharacter() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        return (char) c;
    }

    public double nextDouble() {
        int c = read();
        while (isSpaceChar(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        double res = 0;
        while (!isSpaceChar(c) && c != '.') {
            if (c == 'e' || c == 'E') {
                return res * Math.pow(10, nextInt());
            }
            if (c < '0' || c > '9') {
                throw new InputMismatchException();
            }
            res *= 10;
            res += c - '0';
            c = read();
        }
        if (c == '.') {
            c = read();
            double m = 1;
            while (!isSpaceChar(c)) {
                if (c == 'e' || c == 'E') {
                    return res * Math.pow(10, nextInt());
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                m /= 10;
                res += (c - '0') * m;
                c = read();
            }
        }
        return res * sgn;
    }

    public boolean isExhausted() {
        int value;
        while (isSpaceChar(value = peek()) && value != -1) {
            read();
        }
        return value == -1;
    }

    public String next() {
        return nextString();
    }

    public SpaceCharFilter getFilter() {
        return filter;
    }

    public void setFilter(SpaceCharFilter filter) {
        this.filter = filter;
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
    public int[] nextIntArray(int n){
        int[] array=new int[n];
        for(int i=0;i<n;++i)array[i]=nextInt();
        return array;
    }
    public int[] nextSortedIntArray(int n){
        int array[]=nextIntArray(n);
        Arrays.sort(array);
        return array;
    }
    public int[] nextSumIntArray(int n){
        int[] array=new int[n];
        array[0]=nextInt();
        for(int i=1;i<n;++i)array[i]=array[i-1]+nextInt();
        return array;
    }
    public long[] nextLongArray(int n){
        long[] array=new long[n];
        for(int i=0;i<n;++i)array[i]=nextLong();
        return array;
    }
    public long[] nextSumLongArray(int n){
        long[] array=new long[n];
        array[0]=nextInt();
        for(int i=1;i<n;++i)array[i]=array[i-1]+nextInt();
        return array;
    }
    public long[] nextSortedLongArray(int n){
        long array[]=nextLongArray(n);
        Arrays.sort(array);
        return array;
    }
}
     static boolean[] prime;
    static void sieve(int n) 
    { 
        prime= new boolean[n+2]; 
        for(int i=0;i<n;i++) 
            prime[i] = true; 
        prime[0]=prime[1]=false;
        for(int p = 2; p*p <=n; p++) 
        { 
            if(prime[p] == true) 
            { 
                for(int i = p*2; i <= n; i += p) 
                    prime[i] = false; 
            } 
        }
    }
    static int[] find(List<pair> l, long p){
        int s=0,e=l.size()-1;
        int mid=0;
        int ans=-1;
        while(s<=e){
            mid=s+(e-s)/2;
            if(l.get(mid).a==p){
                return new int[]{mid,1};
            }
            if(l.get(mid).a<p){
                s=mid+1;
            }
            else 
                e= mid-1;
        }
        return new int[]{e,0};
    }
    public static void main(String[] args){
    	InputReader sc=new InputReader(System.in);
    	PrintWriter out=new PrintWriter(new BufferedOutputStream(System.out), true);
    	int n=sc.nextInt();
    	int l=sc.nextInt();
    	int a=sc.nextInt();
    	int s=0,ans=0;
    	while(n-->0){
    	    int t=sc.nextInt();
    	    int l1=sc.nextInt();
    	    if(t-s>=a){
    	        ans++;
    	        s=t;
    	        s+=(l1);
    	    }
    	    s=t;
    	    s+=(l1);
    	}
    	if(l-s>=a) ans+=(l-s)/a;
    	out.println(ans);
    }
    static boolean KpartitionsPossible(int arr[], int n, int K){
    int prefix_sum[]=new int[n];
    prefix_sum[0] = arr[0];
    for (int i = 1; i < n; i++)
        prefix_sum[i] =  prefix_sum[i - 1] + arr[i];
    int total_sum = prefix_sum[n-1];
    if (total_sum % K != 0)
        return false;
    int temp = 0;
    int pos = -1;
    for (int i = 0; i < n; i++) 
    {   
        if (prefix_sum[i] - (pos == -1 ? 0 :prefix_sum[pos]) == total_sum / K) 
        {
            pos = i;
            temp++;
        }
        else if (prefix_sum[i] - (pos == -1 ? 0 :prefix_sum[pos]) > total_sum / K )
            break;
    }
    return (temp == K);
}
    /**  a*x+b*y=gcd(a,b) **/
    static long[] extendedEuclid(long a, long b){
        if(a%b==1) return new long[]{1,-a/b};
        long[] vals = extendedEuclid(b, a % b);
        long a1 = vals[1];
        long b1 = vals[0] - (a / b) * vals[1];
        return new long[]{a1,b1};
    }
    static long gcd(long a, long b){
        if(b==0) return a;
        return gcd(b,a%b);
    }
    static class UnionFind {
	private static int[] parent;
    private static int[] size;
    public UnionFind(int n){
    	parent=new int[n];
    	size=new int[n];
    	for (int i=0;i<n ;i++ ) {
    		parent[i]=i;
    		size[i]=1;
    	}
    }
    public static int Root(int p){
        int i=p;
        while (i!=parent[i]) {
        	i=parent[i];
            parent[i]=parent[parent[i]];
        	
        }
        while (p!=i) {
            int l=parent[p];
            parent[p]=i;
            p=l;
        }
        return i;
    }
    public static void Union(int p,int q){
    	int i=Root(p);
    	int j=Root(q);
    	if(i==j) return ;
    	if (size[i]>size[j]) {
    		size[i]+=size[j];
    		parent[j]=i;
    	}
    	else {
    		size[j]+=size[i];
    		parent[i]=j;
    	}
    }
    public static boolean isConnected(int p,int q){
    	return Root(p)==Root(q);
    }
    }
    static class pair implements Comparable<pair>{
        long a;int b;int c;
        public pair(long i,int j,int k){
            a=i;
            b=j;
            c=k;
        }
        public int compareTo(pair p){
            return (int)(a-p.a);
        }
    }
}