#include<bits/stdc++.h>
using namespace std;
int n,m;
double ans;
struct jb{
int pj;//价值
int pz;//重量
double xjb;性价比
}ab[1005];
bool cmp(jb x,jb y)
{
return x.xjb>=y.xjb;
}
int main()
{
cin>>n>>m;
for(int i=1;i<=n;i++)
{
cin>>ab[i].pz>>ab[i].pj;
ab[i].xjb=ab[i].pj*1.0/ab[i].pz;
}
sort(ab+1,ab+1+n,cmp);
for(int i=1;i<=n;i++)
{
if(ab[i].pz<=m)
{
ans+=ab[i].pj;
m-=ab[i].pz;
}
if(ab[i].pz>m)
{
ans+=m*ab[i].xjb;
break;
}
}
printf("%.2lf",ans);
return 0;
}