n, m = gets.split.map(&:to_i)
params = []
n.times do
  params << gets.split.map(&:to_i)
end

params.sort_by! { |param| param[0] }

ans = 0
until m == 0
  param = params.shift
  count = [m, param[1]].min
  ans += param[0] * count
  m -= count
end

puts ans
