#include<iostream>
#include<algorithm>
#include<vector>
#include<iomanip>
using namespace std;
int n;
double W,v[1<<17],w[1<<17];
int main()
{
	cin>>n>>W;
	vector<pair<double,double> >a;
	for(int i=0;i<n;i++)
	{
		cin>>v[i]>>w[i];
		a.push_back(make_pair(-v[i]/w[i],w[i]));
	}
	sort(a.begin(),a.end());
	double ans=0;
	for(int i=0;i<n;i++)
	{
		ans-=a[i].first*min(a[i].second,W);
		W-=min(a[i].second,W);
	}
	cout<<fixed<<setprecision(9)<<ans<<endl;
}

