#include<bits/stdc++.h>

using namespace std;

#define vec vector
typedef long long ll;
typedef pair<ll,ll> pll;

bool cmp(pll a,pll b)
{
    return a.first*b.second>a.second*b.first;
}

int main()
{
    int N,W;
    vec<pll> stuff;

    cin>>N>>W;

    stuff.resize(N);

    for(int i=0;i<N;i++)
    {
        cin>>stuff[i].first>>stuff[i].second;
    }

    sort(stuff.begin(),stuff.end(),cmp);

    double value=0;
    for(int i=0;i<N&&W>=0;i++)
    {
        if(stuff[i].second<=W){
            value+=stuff[i].first;
        }else
        {
            value+=1.0*stuff[i].first*W/stuff[i].second;
        }
        W-=stuff[i].second;
    }

    cout<<fixed<<setprecision(8)<<value<<endl;

    return 0;
}

