CALCAREA - Calculate the Area

Very simple. You are given polygon and you need to calculate his area. The polygon does not self intersect

Input

A lonely integer N (3 <= N <= 10000) - the number of nodes. On each of the next N lines you will find the coordinates of the next vertex from the polygon.

Output

A single integer - the rounded up area of the polygon.

Example

Input:
4
0 0
1 0
1 1
0 1

Output:
1

Added by:Nikola P Borisov
Date:2008-11-24
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET

hide comments
2017-05-24 13:36:01
Is it a convex polygon ?

Last edit: 2017-05-24 13:38:30
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.