/**
 * Created by hiroqn on 13/10/10.
 */

var fs = require('fs'),
    length = fs.fstatSync(process.stdin.fd).size,
    buffer = new Buffer(length),
    bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0),
    input = buffer.toString('utf8', 0, bytesRead).split('\n');
main();
function main() {
  var temp, n, m, i, list, res;
  while (true) {
    temp = input.shift().split(' ');
    n = +temp[0];
    m = +temp[1];
    if (n === 0 && m === 0) {
      break;
    }
    list = [];
    for (i = 0; i < n; i++) {
      temp = input.shift().split(' ');
      list[i] = [+temp[0], +temp[1]]
    }
    list.sort(function (a, b) {
      return b[1] - a[1];
    });
    res = 0;
    for (i = 0; i < n; i++) {
      if (m > list[i][0]) {
        m -= list[i][0]
      } else {

        res += (list[i][0] - m) * list[i][1];
        m = 0;
      }
    }
    console.log(res);
  }
}