Area

For a given polygon g, calculate the area of the polygon.

g is represented by a sequence of points p1, p2,..., pn where line segments connecting pi and pi+1 (1 ≤ i ≤ n-1) are sides of g. The line segment connecting pn and p1 is also a side of the polygon.

Note that the polygon is not necessarily convex.

Input

The input consists of coordinates of the points p1,..., pn in the following format:

n
x1 y1 
x2 y2
:
xn yn

The first integer n is the number of points. The coordinate of a point pi is given by two integers xi and yi. The coordinates of points are given in the order of counter-clockwise visit of them.

Output

Print the area of the polygon in a line. The area should be printed with one digit to the right of the decimal point.

Constraints

- 3 ≤ n ≤ 100
- -10000 ≤ xi, yi ≤ 10000
- No point will occur more than once.
- Two sides can intersect only at a common endpoint.

Sample Input 1
3
0 0
2 2
-1 1

Sample Output 1
2.0

Sample Input 2
4
0 0
1 1
1 2
0 2

Sample Output 2
1.5

# Buggy version:
n = int(input())
P =[]
s = 0
for i in range(n):P.append([int(i) for i in input().split()])
P.append(P[0])
for i in range(n):
    a = P[i][0] ; b = P[i][1]; c = P[i+1][0] ; P[i+1][1]
    s += a * d - b * c
print(abs(s)*0.5)

# Fixed version:
n = int(input())
P =[]
s = 0
for i in range(n):P.append([int(i) for i in input().split()])
P.append(P[0])
for i in range(n):
    a = P[i][0] ; b = P[i][1]; c = P[i+1][0] ; d = P[i+1][1]
    s += a * d - b * c
print(abs(s)*0.5)

# Buggy version:
n = int(input())
P =[]
s = 0
x0,y0 = [int(i) for i in input().split()]
for i in range(n):
    x,y = [int(i) for i in input().split()]
    P.append([x-x0,y-y0])
for i in range(n-2):
    s += P[i][0]*P[i+1][1] - P[i][1]*P[i+1][0]
print(abs(s)*0.5)

# Fixed version:
n = int(input())
P =[]
s = 0
x0,y0 = [int(i) for i in input().split()]
for i in range(n-1):
    x,y = [int(i) for i in input().split()]
    P.append([x-x0,y-y0])
for i in range(n-2):
    s += P[i][0]*P[i+1][1] - P[i][1]*P[i+1][0]
print(abs(s)*0.5)

# Buggy version:
n = int(input())
P =[]
s = 0
for i in range(n):P.append([int(i) for i in input().split()])
P.append(P[0])
for i in range(n-2):
    s += P[i][0]*P[i+1][1] - P[i][1]*P[i+1][0]
print(abs(s)*0.5)

# Fixed version:
n = int(input())
P =[]
s = 0
for i in range(n):P.append([int(i) for i in input().split()])
P.append(P[0])
for i in range(n):s += (P[i][0])*P[i+1][1] - (P[i][1])*P[i+1][0]
print(abs(s)*0.5)

# Buggy version:
n = int(input())
P =[]
s = 0
for _ in range(n):P.append([-int(i) for i in input().split()])
P.append(P[0])
for j in range(n):s += P[j][1]*P[j+1][0] -  P[j][0] * P[j+1][1]
print(s*0.5)

# Fixed version:
n = int(input())
P =[]
s = 0
for i in range(n):P.append([int(i) for i in input().split()])
P.append(P[0])
for i in range(n):s += P[i][0]*P[i+1][1] - P[i][1]*P[i+1][0]
print(s*0.5)

# Buggy version:
n = int(input())
x = range(n)
P =[]
s = 0
for _ in x:P.append([int(i) for i in input().split()])
P+=P[0]
for j in x:s += P[j][0]*P[j+1][1] - P[j][1]*P[j+1][0]
print(s*0.5)

# Fixed version:
n = int(input())
P =[]
s = 0
for _ in range(n):P.append([int(i) for i in input().split()])
P.append(P[0])
for j in range(n):s += P[j][1]*P[j+1][0] -  P[j][0] * P[j+1][1]
print(-s*0.5)

# Buggy version:
n = int(input())
x = range(n)
P =[]
s = 0
for _ in x:P += [[int(i) for i in input().split()]]
P+=P[0]
for j in x:s += P[j][0]*P[j+1][1] - P[j][1]*P[j+1][0]
print(s*0.5)

# Fixed version:
n = int(input())
x = range(n)
P =[]
s = 0
for i in x:P += [[int(i) for i in input().split()]]
P+=[P[0]]
for i in x:s += P[i][0]*P[i+1][1] - P[i][1]*P[i+1][0]
print(s*0.5)

# Buggy version:
x=range(int(input()))
P=[]
_=0
for _ in x:P+=[[int(i) for i in input().split()]]
P+=[P[0]]
for j in x:s+=P[j][0]*P[j+1][1]-P[j][1]*P[j+1][0]
print(s*0.5)

# Fixed version:
x=range(int(input()))
P=[]
s=0
for i in x:P+=[[int(i) for i in input().split()]]
P+=[P[0]]
for i in x:s+=P[i][0]*P[i+1][1]-P[i][1]*P[i+1][0]
print(s*0.5)

# Buggy version:
n=int(input())
P=[]
for _ in range(n):P+=[[int(i) for i in input().split()]]
_=0
P+=[P[0]]
for j in range(n-1):_+=P[j+1][1]*(P[j][0]-P[j+2][0])-P[j+1][0]*(P[j][1]-P[j+2][1])
print(_*0.5)

# Fixed version:
n = int(input())
x = range(n)
P =[]
n = 0
for _ in x:P += [[int(i) for i in input().split()]]
P+=[P[0]]
for j in x:n += P[j][0]*P[j+1][1] - P[j][1]*P[j+1][0]
print(n*0.5)

# Buggy version:
x=range(int(input()))
f=lambda a,b,c,d : a*d - b*c 
P=[]
for _ in x:P+=[[int(i) for i in input().split()]]
_=0
P+=[P[0]]
for j in x:_+=f(P[j][0],P[j][1],,P[j+1][0]P[j+1][1])
print(_*0.5)

# Fixed version:
x=range(int(input()))
f=lambda a,b,c,d : a*d - b*c 
P=[]
for _ in x:P+=[[int(i) for i in input().split()]]
_=0
P+=[P[0]]
for j in x:_+=f(P[j][0],P[j][1],P[j+1][0],P[j+1][1])
print(_*0.5)

# Buggy version:
x=range(int(input()))
P=[]
_=0
for _ in x:P+=[[int(i) for i in input().split()]]
P+=[P[0]]
for j in x:_+=P[j][0]*P[j+1][1]-P[j][1]*P[j+1][0]
print(_*0.5)

# Fixed version:
x=range(int(input()))
P=[]
Q=[]
for _ in x:P+=[[int(i) for i in input().split()]]
P+=[P[0]]
for j in x:Q+=[P[j][0]*P[j+1][1]-P[j][1]*P[j+1][0]]
print(sum(Q)*0.5)

# Buggy version:
x=range(int(input()),0,-1)
P=[]
for _ in x:P+=[[int(i) for i in input().split()]]
P+=[P[0]]
for j in x:_+=P[j-1][0]*P[j][1]-P[j-1][1]*P[j][0]
print(_*0.5-1)

# Fixed version:
x=range(int(input())-1,-1,-1)
P=[]
for _ in x:P+=[[int(i) for i in input().split()]]
P+=[P[0]]
for j in x:_+=P[j+1][1]*P[j][0]-P[j][1]*P[j+1][0]
print(_*0.5)