N, M = gets.chomp.split(' ').map(&:to_i)
ab_list = N.times.map { gets.chomp.split(' ').map(&:to_i) }
ab_list = ab_list.sort_by { |(a, _)| a }
rest = M
ans = 0
ab_list.each do |(a, b)|
  count = [rest, b].min
  ans += a * count
  rest -= count
  break if rest == 0
end
puts ans
