N,M=gets.chomp.split(" ").map(&:to_i)
lst=[]
for i in 1..N do
  a,b = gets.chomp.split(" ").map(&:to_i)
  lst.push([a,b,a*b])
end
lst=lst.sort
m=0
i=0
cost=0
while(m<M)
  m+=lst[i][1]
  cost+=lst[i][2]
  i+=1
end
if(m>M)
  cost-=lst[i-1][0]*(m-M)
end
print(cost)
