
1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 5 struct point 6 { 7 double x,y; 8 }p[110]; 9 10 double siz(point p1,point p2,point p3) 11 { 12 return ((p1.x-p2.x)*(p1.y-p3.y)-(p1.x-p3.x)*(p1.y-p2.y))/2; 13 } 14 15 int main() 16 { 17 int n; 18 while(scanf("%d",&n)!=EOF) 19 { 20 if(n==0) 21 break; 22 for(int i=0;i<n;i++) 23 { 24 scanf("%lf%lf",&p[i].x,&p[i].y); 25 } 26 double ans=0; 27 for(int i=0;i<n;i++) 28 { 29 ans+=siz(p[0],p[i],p[(i+1)%n]); 30 } 31 printf("%.1lf ",ans); 32 } 33 return 0; 34 }