#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
#define MAX_N (int)1e5+5
using namespace std;
typedef long long ll;
typedef pair<double, int> P;
const int INF = 1<<30; 
const int MOD = 1e9 + 7;
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(8);
    int N, W;
    cin >> N >> W;
    int v[MAX_N], w[MAX_N];
    vector<P> d;
    for(int i = 0; i < N; i++)
    {
        cin >> v[i] >> w[i];
        double tmp = (double)v[i] / w[i];
        d.push_back(P(tmp, w[i]));
    }
    sort(d.begin(), d.end(), greater<P>());
    double ans = 0;
    for(int i = 0; i < d.size(); i++)
    {
        if(W <= 0) break;
        int tmp = min(d[i].second, W);
        ans += d[i].first * tmp;
        W -= tmp;
    }
    cout << ans << endl;
    return 0;
}


