Problem H. Health and light 2

Author:Антон Карабанов   Time limit:1 sec
Input file:Standard input   Memory limit:512 Mb
Output file:Standard output  

Statement

The city of N has a happy event! On the single street of the city, new street lamp will be installed and the new pharmacy will open. Help the city governor to find optimal places for these objects.

The street is represented by a segment of coordinate axis, where the leftmost house has coordinate 0. Let's assume house sizes to be negligibly small compared to the street length and represent houses as points on the axis.

The lamp has "brightness" parameter expressing the distance from the lamp where the light reaches. For example when brightness is equal to 10, lamp installed at the point x = 25 will light the street on the segment from 15 to 35 inclusive.

The pharmacy has "remoteness" parameter expressing the distance from it to the house such that people from that house will still visit. For example when remoteness is equal to 100, pharmacy located at point x = 25, will be visited by people living in houses with coordinates from 0 to 125 inclusive (there are no houses with negative coordinates).

Input format

First line of input contains three integers separated by spaces: n — number of houses, a — brightness и b — remoteness. The second line contains non-negative integers xi — coordinates of each house in ascending order.

Output format

Output a single non-negative integer — maximum total number of houses illuminated by the lamp and convenient to visit pharmacy from. Both lamp and pharmacy may be located at points with the coordinate of some house.

Constraints

1 ≤ n, a, b ≤ 105

0 ≤ xi ≤ 109

Notes on sample

Sample contains ten houses, lamp brightness is 15 and pharmacy remoteness is 20. Lamp can be installed, for example, at point 115 (three houses will be illuminated: 100, 110 and 120). Pharmacy may be located at point 20, in which case it can be visited by people from the first 5 houses. A greater number of houses having "access" to the lamp and pharmacy cannot be obtained.

Sample tests

No. Standard input Standard output
1
10 15 20
0 10 20 30 40 60 70 100 110 120
8

0.159s 0.015s 13