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