Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

A. Automatic Door

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputThere is an automatic door at the entrance of a factory. The door works in the following way:

- when one or several people come to the door and it is closed, the door immediately opens automatically and all people immediately come inside,
- when one or several people come to the door and it is open, all people immediately come inside,
- opened door immediately closes in
*d*seconds after its opening, - if the door is closing and one or several people are coming to the door at the same moment, then all of them will have enough time to enter and only after that the door will close.

For example, if *d* = 3 and four people are coming at four different moments of time *t*_{1} = 4, *t*_{2} = 7, *t*_{3} = 9 and *t*_{4} = 13 then the door will open three times: at moments 4, 9 and 13. It will close at moments 7 and 12.

It is known that *n* employees will enter at moments *a*, 2·*a*, 3·*a*, ..., *n*·*a* (the value *a* is positive integer). Also *m* clients will enter at moments *t*_{1}, *t*_{2}, ..., *t*_{m}.

Write program to find the number of times the automatic door will open. Assume that the door is initially closed.

Input

The first line contains four integers *n*, *m*, *a* and *d* (1 ≤ *n*, *a* ≤ 10^{9}, 1 ≤ *m* ≤ 10^{5}, 1 ≤ *d* ≤ 10^{18}) — the number of the employees, the number of the clients, the moment of time when the first employee will come and the period of time in which the door closes.

The second line contains integer sequence *t*_{1}, *t*_{2}, ..., *t*_{m} (1 ≤ *t*_{i} ≤ 10^{18}) — moments of time when clients will come. The values *t*_{i} are given in non-decreasing order.

Output

Print the number of times the door will open.

Examples

Input

1 1 3 4

7

Output

1

Input

4 3 4 2

7 9 11

Output

4

Note

In the first example the only employee will come at moment 3. At this moment the door will open and will stay open until the moment 7. At the same moment of time the client will come, so at first he will enter and only after it the door will close. Thus the door will open one time.

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Feb/25/2018 12:25:02 (d1).

Desktop version, switch to mobile version.

User lists

Name |
---|