io = STDIN
n,m=io.gets.split.map(&:to_i)
ar=n.times.map{io.gets.split.map(&:to_i)}
tot=0
ar.sort_by{|a,b|a}.each do|a,b|
  if m>b
    tot+=a*b
    m-=b
  else
    tot+=a*m
    m=0
  end
  break if m<=0
end
puts tot