#include<bits/stdc++.h>
using namespace std;
struct q{
double s,d;
double f;
}w[1000];
bool e(q x,q y)
{
return x.f>y.f;
}
int main()
{
double o=0,u=0;
int N,T;
cin>>N>>T;
int a;
for(int i=1;i<=N;i++)
{
double x,y;
cin>>x>>y;
w[i].s=x;
w[i].d=y;
w[i].f=y/x;
}
sort(w+1,w+1+N,e);
long long g=0,b=0,m=0,n=0;
for(int i=1;i<=N;i++)
{
u+=w[i].s;
}
if(u<=T)
{
for(int i=1;i<=N;i++)
o+=w[i].d;
cout<<o;
return 0;
}
while(T>0)
{
b++;
T-=w[b].s;
m+=w[b].d;
}
T=T+w[b].s;
m=m-w[b].d;
double x,c;
x=T*w[b].f;
c=x+m;
printf("%.2lf",c);
return 0;
}