cho.sh
Notes
Loading...

Polygon Area

Time limit

2s

Memory limit

128 MB

Problem

A polygon is formed by N vertices on a two-dimensional coordinate plane. The vertices are given in order along the boundary of the polygon. Write a program that computes the area of this polygon.

Input

The first line contains an integer N. (3 ≤ N ≤ 10,000)

Each of the next N lines contains the coordinates x and y of one vertex, given in the order that forms the polygon. All coordinates are integers, and the absolute value of each coordinate does not exceed 100,000.

Output

Print the area of the polygon on one line. The value must be rounded to one digit after the decimal point.