#include #include using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ int N; cin>>N; long long L; cin>>L; double PI = acos(-1.0); vector x(N),y(N); rep(i,N){ long long T; scanf("%lld",&T); x[i] = cos(PI * 2.0 / L * T); y[i] = sin(PI * 2.0 / L * T); } double ans = 0.0; rep(i,N){ double sp = 0.0,cp = 0.0; int cntp = 0; int jj = i; rep(j,N-1){ jj++; if(jj>=N)break; double ss = y[jj]-y[i]; double cc = x[jj]-x[i]; ans += ss*cp; ans -= cc*sp; sp += ss; cp += cc; } } ans /= N; ans /= N-1; ans /= N-2; ans *= 6.0; ans /= 2.0; cout<