N, M = gets.split.map(&:to_i)
drinks = N.times.map { gets.split.map(&:to_i) }
drinks.sort_by! { |a, b| a }

ans = 0
cnt = 0

drinks.each do |a, b|
  if cnt + b < M
    ans += a * b
    cnt += b
  else
    remain = M - cnt
    ans += a * remain
    break
  end
end

puts ans
