eolymp
bolt
Try our new interface for solving problems
Problems

The area of a polygon

The area of a polygon

Polygon is defined on the plane with integer coordinates of its n vertices in Cartesian coordinate system. Find the area of a polygon. The polygon is simple (it is a closed polygonal chain of line segments in the plane which do not have points in common other than the common vertices of pairs of consecutive segments).

Input

The first line is the number n (3n50 000). The next n lines contains the pairs of numbers - the points coordinates. If you connect the points in this manner, as well as the first and the last point, we obtain the polygon. It is known that the coordinates of the vertices are integers and by the absolute value do not exceed 20 000.

Output

Print a single number - the area of a polygon. It should be rounded to the nearest number with one digit after the decimal point.

Time limit 1 second
Memory limit 64 MiB
Input example #1
4
5 0
0 5
-5 0
0 -5
Output example #1
50.0