#include <bits/stdc++.h>
using namespace std;
int n,m;
double u;
struct JB
{ int c;
int v;
double p;
}jb[101];
bool cmp(JB x,JB y)
{
return x.p>y.p;
}
int main ()
{cout<<fixed<<setprecision(2)<<endl;
cin>>n>>m;
for (int i=1;i<=n;i++)
{
cin>>jb[i].c>>jb[i].v;
jb[i].p=jb[i].v/jb[i].c;
}
sort(jb+1,jb+n+1,cmp);
for (int i=1;i<=n;i++)
{
if (m>jb[i].c)
{
u+=jb[i].v;
m-=jb[i].c;
}
else
{
u+=m*jb[i].p;
break;
}
}
cout<<u;
return 0;
}