N,M = list(map(int,input().split()))
AB = [list(map(int,input().split())) for i in range(N)]
AB_sorted = sorted(AB, key=lambda x: x[0])

money = 0
drink = 0
for i in range(N):
    drink += AB_sorted[i][1]
    money += AB_sorted[i][0] * AB_sorted[i][1]
    if drink >= M:
        money -= (drink - M) * AB_sorted[i][0]
        break
print(money) N,M = list(map(int,input().split())) N list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split M list(map(int,input().split())) for i in range(N) for i in range(N) i range(N) range N for i in range(N) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split AB = [list(map(int,input().split())) for i in range(N)] AB [list(map(int,input().split())) for i in range(N)] AB_sorted = sorted(AB, key=lambda x: x[0]) AB_sorted sorted(AB, key=lambda x: x[0]) sorted AB key=lambda x: x[0] key lambda x: x[0] x[0] x 0 x money = 0 money 0 drink = 0 drink 0 for i in range(N):
    drink += AB_sorted[i][1]
    money += AB_sorted[i][0] * AB_sorted[i][1]
    if drink >= M:
        money -= (drink - M) * AB_sorted[i][0]
        break i range(N) range N drink += AB_sorted[i][1] drink AB_sorted[i][1] [i] AB_sorted i 1 money += AB_sorted[i][0] * AB_sorted[i][1] money AB_sorted[i][0] * AB_sorted[i][1] AB_sorted[i][0] [i] AB_sorted i 0 AB_sorted[i][1] [i] AB_sorted i 1 if drink >= M:
        money -= (drink - M) * AB_sorted[i][0]
        break drink >= M drink M money -= (drink - M) * AB_sorted[i][0] money (drink - M) * AB_sorted[i][0] drink - M drink M AB_sorted[i][0] [i] AB_sorted i 0 break print(money) print money AB_sorted = sorted(AB, key=lambda x: x[0]) sorted(AB, key=lambda x: x[0]) AB_sorted AB = [list(map(int,input().split())) for i in range(N)] [list(map(int,input().split())) for i in range(N)] AB drink += AB_sorted[i][1] AB_sorted[i][1] drink money += AB_sorted[i][0] * AB_sorted[i][1] AB_sorted[i][0] * AB_sorted[i][1] money M = list(map(int,input().split())) list(map(int,input().split())) M N,M = list(map(int,input().split())) list(map(int,input().split())) N money -= (drink - M) * AB_sorted[i][0] (drink - M) * AB_sorted[i][0] money money = 0 0 money drink = 0 0 drink
N,M = list(map(int,input().split()))
AB = [list(map(int,input().split())) for i in range(N)]
AB_sorted = sorted(AB, key=lambda x: x[0])

money = 0
drink = 0
for i in range(N):
    drink += AB_sorted[i][1]
    money += AB_sorted[i][0] * AB_sorted[i][1]
    if drink >= M:
        money -= (drink - M) * AB_sorted[i][0]
        break
print(money)