n, m = gets.split.map(&:to_i)
abs = []
n.times{ abs << gets.split.map(&:to_i) }

abs.sort!{|a, b| a[0] <=> b[0] }

yen = 0
abs.each do |ab|
  if ab[1] < m
    yen += ab[1] * ab[0]
    m -= ab[1]
  else
    yen += ab[0] * m
    break
  end
end

p yen
