#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
bool cmp(pair<ll, ll> a, pair<ll, ll> b){
    return a.second * b.first > b.second * a.first;
}
int main(){
    ll n, k;cin>>n>>k;
    double ans = 0;
    vector< pair<ll, ll> > vt;
    ll Size, Value;
    for(ll i=0; i<n; i++){
        cin>>Value>>Size;
        vt.push_back(make_pair(Size, Value));
    }
    sort(vt.begin(), vt.end(), cmp);
    for(ll i=0; i<n; i++){
        ll z = min(k, vt[i].first);
        k -= z;
        ans += (double)z * ((double)vt[i].second/(double)vt[i].first);
    }
    printf("%.10f\n", ans);
}

