#include<bits/stdc++.h>
using namespace std;
#define double long long
double n,m,ans;
struct node{
double v,w;
}a[107];
double cmp(node x,node y){
if(x.v<y.v)return y.v;
return x.v;
}
int main(){
scanf("%lf %lf",&n,&m);
for(int i=1;i<=n;i++)scanf("%lf %lf",&a[i].v,&a[i].w);
sort(a+1,a+1+n,cmp);
// for(int i=1;i<=n;i++)printf("%lf %lf\n",a[i].v,a[i].w);
for(int i=1;i<=n;i++){
if(m-a[i].w>=0){
m-=a[i].w;
ans+=a[i].w*a[i].v;
}
else{
ans+=a[i].v/a[i].w*m;
break;
}
}
printf("%.2lf",ans);
}