n, m = map(int, input().split())
x = [list(map(int, input().split())) for x in range(n)]

# print(x)
x.sort()
sum = 0
yen = 0
for i in range(n):
    sum += x[i][1]
    yen += x[i][0] * x[i][1]
    if sum >= m:
        yen -= (sum-m)*x[i][0]
        break

print(yen) n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m list(map(int, input().split())) for x in range(n) for x in range(n) x range(n) range n for x in range(n) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split x = [list(map(int, input().split())) for x in range(n)] x [list(map(int, input().split())) for x in range(n)] x.sort() x.sort x sort sum = 0 sum 0 yen = 0 yen 0 for i in range(n):
    sum += x[i][1]
    yen += x[i][0] * x[i][1]
    if sum >= m:
        yen -= (sum-m)*x[i][0]
        break i range(n) range n sum += x[i][1] sum x[i][1] [i] x i 1 yen += x[i][0] * x[i][1] yen x[i][0] * x[i][1] x[i][0] [i] x i 0 x[i][1] [i] x i 1 if sum >= m:
        yen -= (sum-m)*x[i][0]
        break sum >= m sum m yen -= (sum-m)*x[i][0] yen (sum-m)*x[i][0] sum-m sum m x[i][0] [i] x i 0 break print(yen) print yen sum = 0 0 sum yen -= (sum-m)*x[i][0] (sum-m)*x[i][0] yen yen = 0 0 yen x = [list(map(int, input().split())) for x in range(n)] [list(map(int, input().split())) for x in range(n)] x n, m = map(int, input().split()) map(int, input().split()) n m = map(int, input().split()) map(int, input().split()) m yen += x[i][0] * x[i][1] x[i][0] * x[i][1] yen sum += x[i][1] x[i][1] sum
n, m = map(int, input().split())
x = [list(map(int, input().split())) for x in range(n)]

# print(x)
x.sort()
sum = 0
yen = 0
for i in range(n):
    sum += x[i][1]
    yen += x[i][0] * x[i][1]
    if sum >= m:
        yen -= (sum-m)*x[i][0]
        break

print(yen)
