#include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
  int n, m;
  long ans = 0;
  scanf("%d %d", &n, &m);
  int a[n], b[n];
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &a[i], &b[i]);
  }
  for (int i = 0; i < n; i++) {
    int min = i;
    for (int j = i + 1; j < n; j++) {
      if (a[min] > a[j]) {
        int box = a[min];
        a[min] = a[j];
        a[j] = box;
        box = b[min];
        b[min] = b[j];
        b[j] = box;
        b[min] = box;
        min = j;
      }
    }
  }
  int buycount = 0;
  for (int i = 0; i < n; i++) {
    if (buycount + b[i] <= m) {
      ans += a[i] * b[i];
      buycount += b[i];
    } else {
      ans += (m - buycount) * a[i];
    }
  }
  printf("%ld", ans);
  return 0;
}
