Races
A cyclist is preparing for mountain time trial races and needs to plan his nutrition to match his energy requirements throughout the race. His energy will come solely from carbohydrate bars, each containing two types of carbohydrates: fast-digesting (mono- and disaccharides) and slow-digesting (polysaccharides). The effect of consuming one bar is modeled as follows: for the first t_1 seconds after consumption, the bar provides a milliwatts of power ("fast" carbohydrates), and for the next t_2 seconds, it provides b milliwatts of power ("slow" carbohydrates). After this period, the bar's effect ceases. For simplicity, assume:
The digestion and utilization of carbohydrates are linear, meaning the power from different bars consumed at any time adds up.
Energy surpluses do not accumulate.
The cyclist can consume bars instantly at any time during or before the race.
Determine the minimum number of bars required to meet the cyclist's energy needs for the entire race duration.
Input
The first line of the input contains five integers n, t_1, t_2, a, b — representing the expected race time in seconds and the parameters of the bars, where 1 ≤ n, t_1, t_2 ≤ 10^5, and 1 ≤ a, b ≤ 10^9.
The second line contains n integers p_0, p_1, ..., p_n-1 — the desired power levels for each second after the race starts, where 1 ≤ p_j ≤ 10^9.
Output
Output a single integer — the minimum number of bars required.