#include <bits/stdc++.h>
const double INF = 1e+09;
const int MOD = 1e9 + 7;
using namespace std;
int main(void) {
  ios::sync_with_stdio(false);
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, long long>> p(n);
  for (int i = (0); i < (n); ++i) {
    long long a, b;
    cin >> a >> b;
    p[i].first = a;
    p[i].second = b;
  }
  sort(p.begin(), p.end());
  long long ans = 0;
  long long now = 0;
  while (now < m) {
    for (auto v : p) {
      long long val = v.second;
      val = min(m - now, val);
      ans += val * v.first;
      now += val;
    }
  }
  cout << ans << endl;
  return 0;
}
