#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

const double PI = acos(-1.0);
const double INF = DBL_MAX / 10;

int n, m;
vector<double> angle;
vector<vector<vector<double> > > memo;

double solve(int x, int y, int rest)
{
    if((y - x + n - 1) % n < rest)
        return INF;

    if(memo[x][y][rest] > -0.5)
        return memo[x][y][rest];

    if(rest == 0){
        double d = angle[y] - angle[x];
        if(d < 0.0)
            d += 2 * PI;

        double ret;
        if(d < PI){
            ret = d / 2.0 - sin(d) / 2.0;
        }else{
            ret = d / 2.0 + sin(2 * PI - d) / 2.0;
        }
        return memo[x][y][0] = ret;
    }

    double ret = INF;
    for(int i=(x+1)%n; i!=y; (++i)%=n){
        int a = 0;
        int b = rest - 1;
        while(b >= 0){
            double tmp = solve(x, i, a) + solve(i, y, b);
            ret = min(ret, tmp);
            ++ a;
            -- b;
        }
    }
    return memo[x][y][rest] = ret;
}

int main()
{
    for(;;){
        cin >> n >> m;
        if(n == 0)
            return 0;

        angle.resize(n);
        for(int i=0; i<n; ++i){
            cin >> angle[i];
            angle[i] *= 2 * PI;
        }

        memo.assign(n, vector<vector<double> >(n, vector<double>(m, -1.0)));
        double ret = INF;
        for(int i=0; i<n; ++i)
            ret = min(ret, solve(i, i, m-1));
        ret = PI - ret;

        printf("%0.6f\n", ret);
    }
}