#include<bits/stdc++.h>
using namespace std;
int n,m;
float ans;
struct jb{
int pj;
int pz;
float 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/ab[i].pz*1.0;
}
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*1.0;
break;
}
}
printf("%.2lf",ans);
return 0;
}