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)),b+=C,a+=C*=N+2*i,d+=S,c+=S*=N+2*i;}wt(s*3/N--/N--/N);}