#include <bits/stdc++.h>
#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
typedef long long ll;
using namespace std;
const ll mod=1000000007;
#define doublecout(a) cout<<fixed<<setprecision(10)<<a<<endl;

int main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    double num,ans=0,w;
    cin>>n>>w;
    double v[n],b[n];
    vector<pair<double,int> > x;
    for(int i=0;i<n;i++){
    	cin>>v[i]>>b[i];
    	x.pb(make_pair(v[i]/b[i],i));
    }
    sort(be(x));
    reverse(be(x));
    for(auto& i:x){
    	num=min(b[i.second],w);
    	w-=num;
    	ans+=num*i.first;
    }
    doublecout(ans);
    return 0;
}

