#include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i,N) for(int i=0;i<N;++i)
typedef long long int LL;

const LL inf = 11234567890123456;
LL N, M;
std::vector<LL>a;
long double memo[512][512];

long double dp(LL p, LL c)
{
	if (p == N + 1)
	{
		if (c > M) return -inf;
		return 0;
	}
	if (memo[p][c] != -1.) return memo[p][c];
	long double res = -inf;
	for (LL w = 1; w <= N; ++w)
	{
		if (p + w - 1 >= N + 1) break;
		res = std::max(res, dp(p + w, c + 1) + (a[p + w - 1] - a[p - 1]) / (long double)w);
	}
	return memo[p][c] = res;
}

int main()
{
	in >> N >> M;
	a.resize(N + 1);
	rep(i, N) in >> a[i + 1];
	rep(i, N) a[i + 1] += a[i];
	rep(i, 512) rep(j, 512) memo[i][j] = -1.;
	out << std::fixed << std::setprecision(6);
	out << dp(1, 0) << std::endl;
	return 0;
}
