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.
/*
01001101 01000001 01000001 01001100 00100000 01000001 01000001 01010100
01001001 00100000 01001000 01000001 01001001 01001110 00100000 01011001
01000001 01000001 01000100 01000101 01001001 01001110 00100000 01000011
01001000 01001111 01000100 00100000 01001010 01000001 01000001 01010100
01001001 00100000 01001000 01000001 01001001 01001110
 */

/* 01000010 01001001 01001100 01001011 01010101 01001100 00100000 01001000 01001001
 00100000 01000110 01000001 01010010 01011010 01001001 00100000 01001000 01001111
 00100000 01001011 01011001 01000001 00100001 00100000 00111010 00101001
*/

/*
01001000 01001111 01010000 01000101 00100000 01010100 01001000 01001001
01010011 00100000 01001101 01000001 01000100 01000101 00100000 01011001
01001111 01010101 00100000 01010011 01001101 01001001 01001100 01000101
00100001
 */

import java.io.*;
import java.util.InputMismatchException;
import java.util.Map;
import java.util.TreeMap;

/*
        CODE WRITTEN BY RITWIK SHANKER
        JUET
        161B180
*/
public class A514
{
    public static void main(String[] args) throws Exception
    {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
        int n = in.readInt();
        int L = in.readInt();
        int a = in.readInt();
        Map<Integer, Integer> map = new TreeMap<>();
        int t[] = new int[n];
        int l[] = new int[n];

        for (int i = 0; i < n; i++)
        {
            t[i] = in.readInt();
            l[i] = in.readInt();
            map.put(t[i], l[i]);
        }
        int q = 0;
        for (Map.Entry<Integer, Integer> entry : map.entrySet())
        {
            t[q] = entry.getKey();
            l[q] = entry.getValue();
            L -= l[q];
            q += 1;
        }
        for (int i = 0; i < n - 1; i++)
        {
            if (((t[i] + l[i]) - t[i + 1]) < a)
            {
                L -= ((t[i] + l[i]) - t[i + 1]);
            }
        }
        int ans = L / a;
        if (ans < 0)
        {
            out.printLine(0);
        }
        else
        {
            out.printLine(ans);
        }
    }

    //FAST IO
    private static class InputReader
    {
        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 readInt()
        {
            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 String readString()
        {
            int c = read();
            while (isSpaceChar(c))
            {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public double readDouble()
        {
            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, readInt());
                }
                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, readInt());
                    }
                    if (c < '0' || c > '9')
                    {
                        throw new InputMismatchException();
                    }
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public long readLong()
        {
            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 boolean isSpaceChar(int c)
        {
            if (filter != null)
            {
                return filter.isSpaceChar(c);
            }
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

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

        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }

    private static class OutputWriter
    {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream)
        {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer)
        {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects)
        {
            for (int i = 0; i < objects.length; i++)
            {
                if (i != 0)
                {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
            writer.flush();
        }

        public void printLine(Object... objects)
        {
            print(objects);
            writer.println();
            writer.flush();
        }

        public void close()
        {
            writer.close();
        }

        public void flush()
        {
            writer.flush();
        }
    }
}