Cutting Straw Bundles
Time limit1sMemory limit1024 MB
Choose a straight cutting line across N straws of height H so the total quadrilateral area is at least S, minimizing the sum of f_i times each straw's area.
Problem
Kendo master Pidol will demonstrate straw bundle cutting in front of his juniors. There are N straws numbered 1 to N, and Pidol will perform an N-stage cut. Straw i is a rectangle with height H and width 1. An N-stage cut means cutting the bundle formed by placing these N straws side by side in numerical order without gaps, which is a rectangle with height H and width N.

A cut can be represented by a single straight line across the bundle. This line is called the cutting line. The cutting line must always pass through the left and right edges of the bundle. If the line passes through an endpoint of an edge, it still counts as passing through that edge.
Let the two top vertices of straw i be and from left to right, and let the points where the cutting line meets straw i be and from left to right. If the strength of straw i is , the force needed to cut straw i is . In some cases and coincide, or and coincide. Then the area is computed as the area of a triangle instead of a quadrilateral.

Pidol wants to show a 'great N-stage cut'. For an N-stage cut to count as great, the sum must be at least . Find the minimum total force Pidol needs when he performs a great N-stage cut using the least force.
Input
The first line contains integers , , and separated by spaces.
The second line contains integers separated by spaces.
Output
On the first line, print the minimum force needed for a great N-stage cut. An absolute or relative error of up to is accepted.