double s,a,b,c,d,p,S,C;{ll@N,@L,M=N;REP(i,N){ll@P;s+=(a-2*i*b)*(S=sin(p=2*PI*P/L))+(2*i*d-c)*(C=cos(p)),b+=C,a+=C*M,d+=S,c+=S*M,M+=2;}wt(s*3/N--/N--/N);}