#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

using ll = long long;
using P = pair<ll, ll>;

bool compareElem(const P &e1, const P &e2)
{
    return e1.first * e2.second > e2.first * e1.second;
}

int main()
{
    int N, W;
    cin >> N >> W;
    vector<P> elems(N);
    for(int i=0;i<N;++i)
    {
        cin >> elems[i].first >> elems[i].second;
    }

    sort(elems.begin(), elems.end(), compareElem);

    double ans = 0;
    for(int i=0; i<N; ++i)
    {
        if(W >= elems[i].second)
        {
            W -= elems[i].second;
            ans += elems[i].first;
        }
        else{
            ans += double(elems[i].first * W) / elems[i].second;
            break;
        }
    }
    printf("%.10lf\n", ans);
}

