def main
  _, m = $stdin.readline.split(" ").map(&:to_i)
  lines = $stdin.read.split("\n").map{|l| l.split(" ").map(&:to_i)}.sort_by{|x| x[0]}
  min = 0
  lines.each do |line|
    line[1].times do
      min += line[0]
      m -= 1
      if m == 0
        puts min
        return
      end
    end
  end
end

main
