#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <numeric>
#include <string>
#include <cmath>
#include <iomanip>
#include <queue>
#include <list>
#include <set>
#include <stack>
#include <cctype>
#include <cmath>
#include <bitset>

using namespace std;

/* typedef */
typedef long long ll;

/* constant */
const int INF = 1 << 30;
const int NIL = -1;
const int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;

/* global variables */

/* function */

/* main */
int main(){
    int n;
    double w, value, weight;
    cin >> n >> w;
    vector< pair< double, double> > items(n);
    for (int i = 0; i < n; i++) {
        cin >> value >> weight;
        items[i] = make_pair(value / weight, weight);
    }
    sort(items.begin(), items.end(), greater<pair<double, double>>());

    double knapsak = 0;
    for (int i = 0; i < n && w; i++) {
        value = items[i].first;
        weight = items[i].second;
        double take = min(w, weight);
        knapsak += take * value;
        w -= take;
    }

    cout << fixed << setprecision(9) << knapsak << '\n';

}

