x = input().split(" ")
store = int(x[0])
need = int(x[1])
ans = 0
price = {}

for i in range(store):
    y = input().split(" ")
    pri = int(y[0])
    bottles = int(y[1])
    if pri in price.keys():
        price[pri] += bottles
    else:
        price[pri] = bottles
#print(price)
price_sort = sorted(price.items(), key=lambda x: x[0]) #安い順に並び変え
#print(price_sort)
for price_bottles in price_sort: #price_bottles=(価格、本数)になる
    if need == price_bottles[1]:
        ans += price_bottles[1] * int(price_bottles[0])
        break
    elif need > price_bottles[1]:
        ans += price_bottles[1] * int(price_bottles[0])
        need -= price_bottles[1]
    else:
        ans += need * int(price_bottles[0])
        break


print(ans)