#include <bits/stdc++.h>
using namespace std;
const int N = 1000;
int n, t;
struct gold{
double m, v, p;
}a[N];
bool cmp(gold i, gold j){
return i.p > j.p;
}
int main(){
double sum = 0.0;
cin >> n >> t;
for(int i = 0; i < n; i++){
cin >> a[i].m >> a[i].v;
a[i].p = a[i].v / a[i].m;
}
sort(a, a + n, cmp);
for(int i = 0; i < n; i++){
if(t >= a[i].m){
t -= a[i].m;
sum += a[i].v;
}
else{
sum += t * a[i].p;
break;
}
}
printf("%.2f",sum);
return 0;
}