#include <bits/stdc++.h>
using namespace std;
typedef pair<double,double> P;
double S(double a,double b,double c) {
  double s=(a+b+c)/2;
  return sqrt(s*(s-a)*(s-b)*(s-c));
}
double D(P a,P b) {
  return sqrt((a.first-b.first)*(a.first-b.first)+(a.second-b.second)*(a.second-b.second));
}
double calc(P a,P b, P c) {
  return S(D(a,b),D(a,c),D(b,c));
}
  
double toRad(double agl) {
  return agl*M_PI/180.0;
}
P Q(double e) {
  double w=toRad(360*e);
  return P(sin(w),cos(w));
}

int main() {
  int n,m;
  while(cin >> n >> m && n) {
    P p[n];
    for(int i=0; i<n; i++) {
      double x;
      cin >> x;
      p[i]=Q(x);
    }
    double ans=0;
    for(int i=0; i<n; i++) {
      double dp[n][m+1];
      for(int j=0;j<n;j++)for(int k=0;k<=m;k++)dp[j][k]=-1; 
      for(int j=i+1; j<n; j++) dp[j][2]=0;
      for(int j=i+1; j<n; j++) {
        for(int k=2; k<m; k++) {
          if(dp[j][k]<0) continue;
          for(int l=j+1; l<n; l++) {
            dp[l][k+1]=max(dp[l][k+1],dp[j][k]+calc(p[i],p[j],p[l]));
            if(k+1==m) ans=max(ans,dp[l][k+1]);
          }
        }
      }                                      
    }
    printf("%.6f\n",ans);
  }
  return 0;
}
