n,M = map(int,input().split())
d = []
for i in range(n):
    a,b = map(int,input().split())
    d.append([a,b])
 
d.sort(key=lambda x:x[0])

sum_ = 0
cnt = 0
for ab in d:
    if cnt + ab[1] > M:
        sum_ += ab[0] * (M-cnt)
        break
    else:
        cnt += ab[1]
        sum_ += ab[0]*ab[1]
print(sum_) n,M = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split M d = [] d [] for i in range(n):
    a,b = map(int,input().split())
    d.append([a,b])
  i range(n) range n a,b = map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b d.append([a,b]) d.append d append [a,b] a b d.sort(key=lambda x:x[0]) d.sort d sort key=lambda x:x[0] key lambda x:x[0] x[0] x 0 x sum_ = 0 sum_ 0 cnt = 0 cnt 0 for ab in d:
    if cnt + ab[1] > M:
        sum_ += ab[0] * (M-cnt)
        break
    else:
        cnt += ab[1]
        sum_ += ab[0]*ab[1] ab d if cnt + ab[1] > M:
        sum_ += ab[0] * (M-cnt)
        break
    else:
        cnt += ab[1]
        sum_ += ab[0]*ab[1] cnt + ab[1] > M cnt + ab[1] cnt ab[1] ab 1 M sum_ += ab[0] * (M-cnt) sum_ ab[0] * (M-cnt) ab[0] ab 0 M-cnt M cnt break cnt += ab[1] cnt ab[1] ab 1 sum_ += ab[0]*ab[1] sum_ ab[0]*ab[1] ab[0] ab 0 ab[1] ab 1 print(sum_) print sum_ sum_ += ab[0]*ab[1] ab[0]*ab[1] sum_ a,b = map(int,input().split()) map(int,input().split()) a cnt = 0 0 cnt cnt += ab[1] ab[1] cnt M = map(int,input().split()) map(int,input().split()) M sum_ = 0 0 sum_ sum_ += ab[0] * (M-cnt) ab[0] * (M-cnt) sum_ d = [] [] d b = map(int,input().split()) map(int,input().split()) b n,M = map(int,input().split()) map(int,input().split()) n
n,M = map(int,input().split())
d = []
for i in range(n):
    a,b = map(int,input().split())
    d.append([a,b])
 
d.sort(key=lambda x:x[0])

sum_ = 0
cnt = 0
for ab in d:
    if cnt + ab[1] > M:
        sum_ += ab[0] * (M-cnt)
        break
    else:
        cnt += ab[1]
        sum_ += ab[0]*ab[1]
print(sum_)
