/*
 * Gerrymandering Roundness - Fred Pickel
 * GNY Regional
 */
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>

#define EPS (1.0e-6)
#define MAX_VERTS	100
#define MAX_PROB	1000

double C_PI = 3.14159265358979323846;
typedef struct _point_
{
	double x;
	double y;
} POINT, *PPOINT;

POINT verts[MAX_VERTS];

POINT centroid;
int nvert;
double polyarea;

int AreaCentroid(void)
{
	double areasum, xsum, ysum, xc, yc, dx1, dx2, dy1, dy2;
	double x, y, darea;
	int i;

	// first find centroind of vertices as base
	xc = yc = 0.0;
	for(i = 0; i < nvert ; i++) {
		xc += verts[i].x;
		yc += verts[i].y;
	}
	xc /= ((double)nvert);
	yc /= ((double)nvert);

	areasum = xsum = ysum = 0.0;
	for(i = 0; i < nvert ; i++) {
		dx1 = verts[i].x - xc;
		dy1 = verts[i].y - yc;
		dx2 = verts[(i+1)%nvert].x - xc;
		dy2 = verts[(i+1)%nvert].y - yc;
		darea = 0.5*(dx1*dy2 - dx2*dy1);
		x = (dx1 + dx2)/3.0;	// realtive centroid of triangle
		y = (dy1 + dy2)/3.0;
		xsum += darea*x;
		ysum += darea*y;
		areasum += darea;
	}
	polyarea = areasum;
	centroid.x = xc + (xsum/areasum);
	centroid.y = yc + (ysum/areasum);
	return 0;
}

// x0,y0 point on line <dx,dy> vectro in dir of line r radius of cri=cle centered at (0,0)
// on return 0 if no intersect between t = 0 and t = 1
// return 1 if two intersects in t[0,1], 2 if 1 intersect and t= 0 inside 
// 3 if1 intersect and t = 1 inside
// in latter 2 cases *pt1 is inside t
// plug x = x0 + t*dx and y = y0 + t*dy into x*x + y*y = r*r
// x0*x0 + t*2*dx*x0 + t^2*dx*dx + y0*y0 + t*2*dy*y0 + t^2 *dy*dy = r*r
// OR (dx*dx + dy*dy)*t^2 + 2*(dx*x0 + dy*y0)*t + (x0*x0 + y0*y0 - r*r) = 0;
int InterCircleLine(double x0, double y0, double dx, double dy, double r, double *pt1, double *pt2)
{
	double A, B2, C, desc, t1, t2;
	A = (dx*dx + dy*dy);
	B2 = (dx*x0 + dy*y0);
	C = (x0*x0 + y0*y0 - r*r);
	desc = B2*B2 - A*C;
	*pt1 = *pt2 = -1.0;	// default outside
	if(A < EPS) {	// very short segment not obviously inside(previous test)
		return 0;
	}
	if(desc <= EPS) { // no significant inter
		return 0;
	} else {
		desc = sqrt(desc);
		t1 = (-B2 + desc)/A;
		t2 = (-B2 - desc)/A;
		if((t1 >= 0.0) && (t1 <= 1.0)) {	// t1 is inside
			if((t2 >= 0.0) && (t2 <= 1.0)) {
				if(t1 < t2) {
					*pt1 = t1;
					*pt2 = t2;
				} else {
					*pt1 = t2;
					*pt2 = t1;
				}
				return 1;
			} else {	// only t1
				*pt1 = t1;
				*pt2 = t2;
				if(C > 0.0) { // 0 is outside
					return 3;
				} else {
					return 2;
				}
			}
		} else if((t2 >= 0.0) && (t2 <= 1.0)) { // only t2
			*pt1 = t2;
			*pt2 = t1;
			if(C > 0.0) { // 0 is outside
				return 3;
			} else {
				return 2;
			}
		} else { // none inside
			return 0;
		}
	}
}

// return angle in radians from ray to (x1,y1) to ray to (x2,y2)
// we need to deal with going past the negative x axis in either direction
// the absolute change in angle < PI
double DAng(double y2, double x2, double y1, double x1)
{
	double ang = atan2(y2, x2) - atan2(y1, x1);
	if(ang > C_PI) {
		ang -= 2.0*C_PI;
	} else if (ang < (-C_PI)) {
		ang += 2.0*C_PI;
	}
	return ang;
}

// for each edge of the polygon, determine which parts of the edge are inside the circle
// and which are outside
// for the parts inside, add signed area of triangle from centroid to inside edge segment
// for parts outside add signed area of sector of circle determined by endpoints of
// outside segment of edge
double DiskInter(double radius)
{
	double areasum, rsq, xc, yc, dx1, dx2, dy1, dy2, d1sq, d2sq;
	double darea, dx3, dy3, t1, t2, x1, x2, y1, y2;
	int i, type;
	areasum = 0.0;
	rsq = radius*radius;
	xc = centroid.x;
	yc = centroid.y;
	for(i = 0; i < nvert ; i++) {
		dx1 = verts[i].x - xc;
		dy1 = verts[i].y - yc;
		dx2 = verts[(i+1)%nvert].x - xc;
		dy2 = verts[(i+1)%nvert].y - yc;
		dx3 = verts[(i+1)%nvert].x - verts[i].x;
		dy3 = verts[(i+1)%nvert].y - verts[i].y;
		d1sq = dx1*dx1 + dy1*dy1;
		d2sq = dx2*dx2 + dy2*dy2;
		if((d1sq <= rsq) && (d2sq <= rsq)) {	// seqment inside use triangle area
			darea = 0.5*(dx1*dy2 - dx2*dy1);
			areasum += darea;
		} else {
			type = InterCircleLine(dx1, dy1, dx3, dy3, radius, &t1, &t2);
			switch(type) {
			case 0:
				darea = 0.5*DAng(dy2, dx2, dy1, dx1)*rsq;
				break;
			case 1:
				x1 = dx1+t1*dx3; y1 = dy1+t1*dy3; 
				x2 = dx1+t2*dx3; y2 = dy1+t2*dy3;
				darea = 0.5*DAng(y1, x1, dy1, dx1)*rsq;
				darea += 0.5*(x1*y2 - x2*y1);
				darea += 0.5*DAng(dy2, dx2, y2, x2)*rsq;
				break;
			case 2:	// dx1, dx2 inside
				x1 = dx1+t1*dx3; y1 = dy1+t1*dy3;
				darea = 0.5*(dx1*y1 - dy1*x1);
				darea += 0.5*DAng(dy2, dx2, y1, x1)*rsq;
				break;
			case 3:
				x1 = dx1+t1*dx3; y1 = dy1+t1*dy3; 
				darea = 0.5*DAng(y1, x1, dy1, dx1)*rsq;
				darea += 0.5*(x1*dy2 - y1*dx2);
				break;
			default: 
				return -1.0;
			}
			areasum += darea;
		}
	}
	return areasum;
}

char inbuf[256];

int main()
{
	double x, y, inter, r;
	int n;
	if(scanf("%d", &n) != 1) {
		fprintf(stderr, "can't read vertex count\n");
		return -3;
	}
	if((n < 3) || (n > MAX_VERTS)){
		fprintf(stderr, "vertex count %d not in range 3 .. %d\n", n, MAX_VERTS);
		return -5;
	}
	nvert = n;
	for(n = 0; n < nvert ; n++) {
		if(scanf("%lf %lf", &x, &y) != 2) {
			fprintf(stderr, "scan failed on vertex %d\n", n+1);
			return -3;
		}
		verts[n].x = x;
		verts[n].y = y;
	}
	AreaCentroid();
	r = sqrt(fabs(polyarea)/C_PI);
	inter = DiskInter(r);
	printf("%.4lf\n", inter/fabs(polyarea));
	return 0;
}
