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|
  yen += ab[0] * [m, ab[1]].min
  m -= ab[1]
  break if m.negative?
end

p yen
