#include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;
struct node {
int x, y;
double price;
}node;
bool cmp(struct node x, struct node y) {
return x.price > y.price;
}
int main() {
int n, m; cin >> n >> m;
struct node* num = new struct node[n];
for (int i = 0; i < n; i++) {
cin >> num[i].x >> num[i].y;
num[i].price = (num[i].y * 1.0) / num[i].x;
}
sort(num, num + n, cmp);
int i = 0;
double sum = 0;
while (m > 0) {
if (m <= num[i].x) {
sum += m * num[i].price;
m = 0;
}
else{
sum += num[i].x * num[i].price;
m -= num[i].x;
}
i++;
}
printf("%.2f", sum);
}