input = require('fs').readFileSync('/dev/stdin', 'utf8')
lines = input.split('\n')
lines.pop()
line = lines.shift().split(' ')
N = line[0] * 1
M = line[1] * 1

lines = lines.map((x) => {
    return x.split(' ')
}).sort((a, b) => {
    return a[0] - b[0]
})
cnt = 0;
fee = 0;
for(i=0; i<N; i++) {
    c = 0
    b = lines[i][1] * 1
    if (cnt < M) {
        if (cnt + b > M) {
            c = M - cnt
        } else {
            c = b
        }
    } else {
        break;
    }
    cnt += c
    fee += c * lines[i][0]
}
console.log(fee)
