Reservoir#2151

Reservoir

1 second
64 megabytes
Easy

Consider a polygonal chain with vertices having coordinates (x_1, y_1), (x_2, y_2), (x_3, y_3), \ldots, (x_n, y_n) , such that x_1 < x_2 < \ldots < x_n and y_i \ne y_{i+1} for all . From the leftmost (x_1, y_1) and rightmost (x_n, y_n) points, draw rays upward. Transform this plane figure into a three-dimensional body of thickness .

![prb2151](https://static.e-olymp.com/content/df/df62483182e53a9d5a61d2f158cc6038dcce0582.jpg)

This creates a reservoir. Its front and back faces are flat, vertical, parallel, and separated by a distance of . The left and right sides (formed by vertical rays) are also flat, vertical, and parallel. The bottom of the reservoir follows the initial polygonal chain. The reservoir is set so that, regardless of the bottom's shape or the water level, it will never tip over.

cubic units of water are poured into the reservoir from the left side. Write a program to determine the area of the resulting water surface.

Input

The number of vertices in the polygonal chain ( 2 \le n \le 123456 ), followed by pairs of integers x_1\ y_1,\ \ldots,\ x_n\ y_n describing the coordinates of the vertices, and finally the volume of water . All coordinates are integers between -10^6 and 10^6 . The volume is an integer with 0 \le V \le 10^{12} .

Output

Print a real number — the area of the resulting water surface. The absolute accuracy must not be worse than 10^{-3} .

![prb2151-1](https://static.e-olymp.com/content/7b/7b3b6726f6219b430c75c28a2923542e093a6149.jpg)

Examples

Example 1

Loading
Loading