#include <cstdio>#include <algorithm> #include <cstring>#include <cmath>using namespace std;const double PI = 3.1415926535898; struct Point{ double x, y; Point(double xx = 0.0, double yy = 0.0):x(xx), y(yy){} };double det(double x1, double y1, double x2, double y2){ return (x1 * y2) - (x2 * y1);} inline double cross(Point a, Point b, Point c){ return det(b.x - a.x, b.y - a.y, c.x - a.x, c.y - a.y);}double f[50][50][50];int main(){ double p; Point a[50]; int n, m; while (scanf("%d %d", &n, &m) == 2 && (n + m)){ for (int i = 0; i < n; i++){ scanf("%lf", &p); a[i] = Point(cos(p * 2 * PI), sin(p * 2 * PI)); } memset(f, 0, sizeof(f));for (int k = 3; k <= m; k++){ for (int i = 0; i < n; i++){ for (int j = (i + 2) % n; j != i; j++, j %= n){ for (int t = (i + 1)%n; t != j; t++, t %= n){ f[i][j][k] = max(f[i][t][k - 1] + cross(a[i], a[t], a[j]) / 2, f[i][j][k]); } } } }double ans = 0.0; for (int i = 0; i < n; i++){ for (int j = (i + 2) % n; j != i; j++, j %= n){ ans = max(ans, f[i][j][m]); } }printf("%.6fn", ans); } return 0;}