#include
/*
#include
#include
#include
#include */
using namespace std;
#define Riep(n) for(int i=1;i<=n;i++)
#define Riop(n) for(int i=0;i#define Rjep(n) for(int j=1;j<=n;j++)
#define Rjop(n) for(int j=0;j#define mst(ss,b) memset(ss,b,sizeof(ss));
typedef long long LL;
const LL mod=1e9+7;
const double PI=acos(-1.0);
const LL inf=1e18;
const int N=1e5+4;
int n,num[N];
LL k;
double sum[N],a[N],temp[N];
int lowbit(int x)
{
return x&(-x);
}
void update(int x)
{
while(x<=n)
{
num[x]++;
x+=lowbit(x);
}
}
int query(int x)
{
int ans=0;
while(x>0)
{
ans+=num[x];
x-=lowbit(x);
}
return ans;
}
struct node
{
double temp;
int id,pos;
}po[N];
int cmp1(node x,node y)
{
if(x.temp==y.temp)x.id<y.id;
return x.temp<y.temp;
}
int cmp2(node x,node y)
{
return x.id<y.id;
}
int check(double x)
{
mst(num,0);
LL ans=0;
for(int i=1;i<=n;i++)
{
po[i].temp=sum[i]-x*i;
po[i].id=i;
}
sort(po+1,po+n+1,cmp1);
for(int i=1;i<=n;i++)po[i].pos=i;//离散化
sort(po+1,po+n+1,cmp2);
for(int i=1;i<=n;i++)
{
if(po[i].temp>=0)ans++;//还有0的情况;
ans=ans+(LL)query(po[i].pos);
update(po[i].pos);
}
if(ans>=k)return 1;
return 0;
}
int main()
{
cin>>n>>k;
Riep(n)
{
scanf("%lf",&a[i]);
sum[i]=sum[i-1]+a[i];
}
double l=1,r=100000;
while(abs(r-l)>=0.0001)
{
double mid=(l+r)/2;
if(check(mid))l=mid;
else r=mid;
}
printf("%.8lf\n",l);
return 0;
}