#include "pch.h"
#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef struct node {
double weight;
double value;
double ave;
};
double v[1005] = { 0 };
int main()
{
int N, T;
cin >> N >> T;
node* gold = new node[N + 1];
double *ave = new double[N + 1];
for (int i = 1; i <= N; i++)
{
cin >> gold[i].weight >> gold[i].value;
gold[i].ave = gold[i].value / gold[i].weight;
}
sort(&gold[1], &gold[N + 1], [](node const &a, node const &b) {return a.ave > b.ave; });
int j = 0;
for (int i = 1; i <= N; i++)
{
while (gold[i].weight != 0)
{
if (T <= 0) //容量为零结束,不放入背包
{
break;
}
++j;
v[j] = v[j-1]+gold[i].ave; //容量为j最大价值
--gold[i].weight; //该价值的金币堆总量减一
--T; //剩余容量
}
}
cout.setf(ios::fixed);
cout.precision(2);
cout << v[j] << endl;
return 0;
}