n,m=gets.chomp.split(" ").map(&:to_i)
a=[]
b=[]
0.upto(n-1) do |i|
  ab=gets.chomp.split(" ").map(&:to_i)
  a.push(ab[0])
  b.push(ab[1])
end
count=0
while m>0
  index=a.index(a.min)
  kazu=b[index]<m ? b[index] : m
  m-=kazu
  count+=a[index]*kazu
  a.delete_at(index)
  b.delete_at(index)
end
puts count

