Wheel of Fortune#2181

Wheel of Fortune

1 second
64 megabytes
Easy

The entertainment TV channel airs the show "Wheel of Fortune". In this game, participants spin a large wheel divided into sectors, each marked with a number. When the wheel stops, a pointer indicates one of these sectors, and the number on that sector determines the player's winnings.

A young contestant observed that the wheel slows down as it spins, because the pointer catches on protrusions located between the sectors. If the wheel spins with an angular speed of degrees per second and the pointer catches on a protrusion while moving from sector to the next, the current angular speed decreases by degrees per second. If v \leq k, the wheel cannot overcome the protrusion and stops. In this case, the pointer indicates sector .

Before spinning the wheel, the contestant wants to maximize their winnings. Knowing the order of the numbers on the wheel's sectors, the contestant wants to choose an initial angular speed so that after stopping, the pointer indicates the sector with the largest possible number. The wheel can be spun in either direction, and the initial angular speed can be chosen between and degrees per second.

Write a program that, given the arrangement of numbers on the sectors, the minimum and maximum possible initial angular speed, and the deceleration when crossing sector boundaries, calculates the maximum possible winning.

Input

The first line contains an integer (3 \leq n \leq 100) — the number of sectors on the wheel.

The second line contains positive integers, each not exceeding — the numbers written on the wheel's sectors, in the order of the sectors clockwise. Initially, the pointer points to the first number.

The third line contains three integers: , and (1 \leq a \leq b \leq 10^9, 1 \leq k \leq 10^9).

Output

Output a single integer — the maximum winnings possible.

Examples

Example 1

Loading
Loading