N,m = gets.chomp.split.map(&:to_i)
map = []
N.times do
  map.push(gets.chomp.split.map(&:to_i))
end
map.sort! {|a,b| a[0] <=> b[0]}

cost = 0
map.each do |item|
  if m > item[1]
    cost += item[0] * item[1]
    m -= item[1]
  else
    cost += item[0] * m 
    puts cost
    exit
  end
end
