n,m=gets.split(' ').map(&:to_i)
drink=Array.new(n){Array.new(2,0)}

for i in 0..n-1
  a,b=gets.split(' ').map(&:to_i)
  drink[i][0]=a
  drink[i][1]=b
end

drink.sort!{|a,b| b[0]<=>a[0]}.reverse!


sum=0
for i in 0..n-1
  if m<drink[i][1]
    sum+= drink[i][0]*m
    break
  else
    m-=drink[i][1]
    sum+=drink[i][0]*drink[i][1]
  end
end
puts sum
