#include <stdio.h>
#include <stdlib.h>
struct Node
{
int weight;
int value;
double w;
} coin[110];
int cmp(const void *a, const void *b)
{
struct Node *coin_a = (struct Node *)a;
struct Node *coin_b = (struct Node *)b;
return coin_b->w - coin_a->w;
}
int main()
{
int N, T;
double s = 0;
scanf("%d%d", &N, &T);
for (int i = 0; i < N; i++)
{
scanf("%d%d", &coin[i].weight, &coin[i].value);
coin[i].w = (double)coin[i].value / coin[i].weight;
}
qsort(coin, N, sizeof(coin[0]), cmp);
for (int i = 0; i < N; i++)
{
if (T >= coin[i].weight)
{
T -= coin[i].weight;
s += coin[i].value;
}
else
{
s += coin[i].w * T;
break;
}
}
printf("%.2f", s);
return 0;
}