N, M = gets.split.map(&:to_i)
shop_array = []
current_value = 0
current_number = 0

N.times{|i|
  a, b = gets.split.map(&:to_i)
  shop_array << {value: a, number: b}
}

shop_array.sort!{|a,b|a[:value] <=> b[:value]}
shop_array.each{|item|
  current_number += item[:number]
  current_value += (item[:value])*(item[:number])

  if (current_number > M)
    current_value -= (current_number-M)*item[:value]
    break
  end
}

puts current_value
