n, m= map(int, input().split())
got=0
sell={}
buy=0
for i in range(n):
  a,b=map(int,input().split())
  if a not in sell:
    sell[a]=0
  sell[a]+=b
sell=sorted(sell.items())
if m<=sell[0][1]:
  print(m*(sell[0][0]))
  exit()
for lis in sell:
  got+=lis[1]
  if got>m:
    buy+=(m-got+lis[1])*lis[0]
    print(buy)
    exit()
  else:
    buy+=(lis[0])*(lis[1]) n, m= map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m got=0 got 0 sell={} sell {} buy=0 buy 0 for i in range(n):
  a,b=map(int,input().split())
  if a not in sell:
    sell[a]=0
  sell[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 if a not in sell:
    sell[a]=0
   a not in sell a sell sell[a]=0 sell[a] sell a 0 sell[a]+=b sell[a] sell a b sell=sorted(sell.items()) sell sorted(sell.items()) sorted sell.items() sell.items sell items if m<=sell[0][1]:
  print(m*(sell[0][0]))
  exit() m<=sell[0][1] m sell[0][1] [0] sell 0 1 print(m*(sell[0][0])) print m*(sell[0][0]) m sell[0][0] [0] sell 0 0 exit() exit for lis in sell:
  got+=lis[1]
  if got>m:
    buy+=(m-got+lis[1])*lis[0]
    print(buy)
    exit()
  else:
    buy+=(lis[0])*(lis[1]) lis sell got+=lis[1] got lis[1] lis 1 if got>m:
    buy+=(m-got+lis[1])*lis[0]
    print(buy)
    exit()
  else:
    buy+=(lis[0])*(lis[1]) got>m got m buy+=(m-got+lis[1])*lis[0] buy (m-got+lis[1])*lis[0] m-got+lis[1] m-got m got lis[1] lis 1 lis[0] lis 0 print(buy) print buy exit() exit buy+=(lis[0])*(lis[1]) buy (lis[0])*(lis[1]) lis[0] lis 0 lis[1] lis 1 m= map(int, input().split()) map(int, input().split()) m buy+=(lis[0])*(lis[1]) (lis[0])*(lis[1]) buy got+=lis[1] lis[1] got a,b=map(int,input().split()) map(int,input().split()) a sell={} {} sell b=map(int,input().split()) map(int,input().split()) b got=0 0 got buy+=(m-got+lis[1])*lis[0] (m-got+lis[1])*lis[0] buy n, m= map(int, input().split()) map(int, input().split()) n sell=sorted(sell.items()) sorted(sell.items()) sell buy=0 0 buy
n, m= map(int, input().split())
got=0
sell={}
buy=0
for i in range(n):
  a,b=map(int,input().split())
  if a not in sell:
    sell[a]=0
  sell[a]+=b
sell=sorted(sell.items())
if m<=sell[0][1]:
  print(m*(sell[0][0]))
  exit()
for lis in sell:
  got+=lis[1]
  if got>m:
    buy+=(m-got+lis[1])*lis[0]
    print(buy)
    exit()
  else:
    buy+=(lis[0])*(lis[1])