N, m= gets.split(' ').map(&:to_i)
a = []
b = []
sum = 0

N.times.with_index do |i|
  key = {}
  key[:price], key[:quantity] = gets.split(' ').map(&:to_i)
  a << key
end

a.sort! {|a, b| a[:price] <=> b[:price] }

a.each do |val|
  if (m-val[:quantity]) >= 0
    sum = sum + val[:quantity] * val[:price]
    m = m - val[:quantity]
  else
    sum = sum + val[:price] * m
    break
  end
end

puts sum
