#include<bits/stdc++.h>
using namespace std;
struct product{
    int profit;
    int weight;
};
bool cmp(int profit,int weight){
    double r1 = (double) a.profit/ (double) a.weight;
     double r2 = (double) b.profit/ (double) b.weight;
    
}
void fractional(int n,vector<product>prd,int w,double final){
    sort(prd.begin(),prd.end(),cmp);
    for(int i=0;i<n;i++){
        if(prd[i].weight<=w){
            final+=prd[i].profit;
            w-=prd[i].weight;
        }
        else{
            final+= prd[i].profit*(double) w/(double)prd[i].weight;
        }
    }
}
int main(){
    int n;
    cin>>n;
     int w;
    cin>>w;
    vector<product>prd(n);
    for(int i=0;i<n;i++){
        cin>>prd[i].profit>>prd[i].weight;
    }
   
    double final =0.0;
    fractional(n,prd,w,final);
    cout<<final<<endl;
}