/**
 * Author: Sergey Kopeliovich (Burunduk30@gmail.com)
 * Date: 2015.01.23
 */

#include <bits/stdc++.h>

using namespace std;

#define forn(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int n, W;
  scanf("%d%d", &n, &W);
  struct T { int v, w; double f() { return 1. * v / w; } } a[n];
  forn(i, n)
    scanf("%d%d", &a[i].v, &a[i].w);
  sort(a, a + n, []( T x, T y ) { return x.f() > y.f() + 1e-9; });
  double sum = 0;
  forn(i, n) {
    double dw = min(W, a[i].w);
    W -= dw;
    sum += dw * a[i].v / a[i].w;
  }
  printf("%.3f\n", sum);
}
