#include <iostream>
#include <algorithm>
#include <string>
#include <fstream>
#include <vector>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
#include <set>
#include <map>
using namespace std;
typedef long long ll;


void printarray(int n, int a[])
{
    for (int i = 1; i < n + 1; i++)
    {
        cout << a[i];
        if (i != n)
            cout << " ";
    }
    cout << endl;
}

int cycleanalysis(int n, int a[])
{
    int pos, ret, next;
    pos = 0, ret = 0;
    for (int i = 1; i < n + 1; i++)
    {
        pos = i;
        while (a[pos] != pos)
        {
            ret += (a[pos] + a[a[pos]]);
            next = a[pos];
            swap(a[pos], a[a[pos]]);
            pos = next;
        }
    }

    return ret;
}

int main()
{

#ifdef DEBUG
    cout << "DEBUG MODE" << endl;
    ifstream in("input.txt"); //for debug
    cin.rdbuf(in.rdbuf());    //for debug
#endif

    double n, weight, total, vi, wi;
    vector<tuple<double, double, double>> material;
    cin >> n >> weight;
    for (int i = 0; i < n; i++){
    cin >> vi >> wi;
    material.push_back(make_tuple(vi/wi, vi, wi));
    }
    sort(material.rbegin(),material.rend());

    for (tuple<double, double, double> x : material){
        if (weight >= get<2>(x)) {
            total += get<1>(x);
            weight -= get<2>(x);
        }
        else if (weight > 0){
            total += get<0>(x)*weight;
            weight = 0;
        }
    }
        
    printf( "%.8f", total );

    return 0;
}
