
import collections
n,m = map(int,raw_input().split(' '))

costs = [map(int, raw_input().split(' ')) for _ in range(n)]
costs.sort(key = lambda x:-x[0])
q = collections.deque(costs)
r = 0
while(m):
	u,v = q.pop()
	t = min(v,m)
	m -=t
	r += t * u
print r import collections collections n,m = map(int,raw_input().split(' ')) n map(int,raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' m map(int, raw_input().split(' ')) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) map(int, raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' costs = [map(int, raw_input().split(' ')) for _ in range(n)] costs [map(int, raw_input().split(' ')) for _ in range(n)] costs.sort(key = lambda x:-x[0]) costs.sort costs sort key = lambda x:-x[0] key lambda x:-x[0] -x[0] x[0] x 0 x q = collections.deque(costs) q collections.deque(costs) collections.deque collections deque costs r = 0 r 0 while(m):
	u,v = q.pop()
	t = min(v,m)
	m -=t
	r += t * u m u,v = q.pop() u q.pop() q.pop q pop v t = min(v,m) t min(v,m) min v m m -=t m t r += t * u r t * u t u print q = collections.deque(costs) collections.deque(costs) q u,v = q.pop() q.pop() u costs = [map(int, raw_input().split(' ')) for _ in range(n)] [map(int, raw_input().split(' ')) for _ in range(n)] costs n,m = map(int,raw_input().split(' ')) map(int,raw_input().split(' ')) n v = q.pop() q.pop() v r = 0 0 r r += t * u t * u r m = map(int,raw_input().split(' ')) map(int,raw_input().split(' ')) m m -=t t m t = min(v,m) min(v,m) t

import collections
n,m = map(int,raw_input().split(' '))

costs = [map(int, raw_input().split(' ')) for _ in range(n)]
costs.sort(key = lambda x:-x[0])
q = collections.deque(costs)
r = 0
while(m):
	u,v = q.pop()
	t = min(v,m)
	m -=t
	r += t * u
print r