Broken#5960

Broken

4 seconds
256 megabytes
Easy

A closed polygonal chain is given on the plane.

Your task is to find the area of the region enclosed by this polygonal chain. The closed polygonal chain consists of a sequence of points \{p_i\}_{i=1}^N and segments that connect each consecutive pair of points in the sequence, including a segment that connects the first and last points. The enclosed region is defined as the set of points on the plane that cannot be connected to the point by a continuous curve that does not intersect the polygonal chain.

Input

The first line contains the integer (1 \le N \le 1000), which represents the number of vertices in the polygonal chain. The following lines each contain two integers: x_i, y_i (0 \le x_i, y_i \le 1000), which are the coordinates of the -th vertex of the polygonal chain.

Output

Output one real number, which is the area of the enclosed region, with an absolute or relative error of at most 10^{-8}.

Examples

Example 1

Loading
Loading