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

abs.sort!{ |x,y| x[0]<=>y[0] }
btl, sum = 0, 0
abs.each do | ab |
  if btl+ab[1] >= m
    sum += (m - btl) * ab[0]
    btl += (m-btl)
    break
  else
    sum += ab[1] * ab[0]
    btl += ab[1]
  end
end
p sum