N, M = gets.split.map(&:to_i)
AB_n = N.times.map{|_| gets.split.map(&:to_i)}.sort{|a, b| a[0] <=> b[0]}

m = M
ans = 0
AB_n.each do |a, b|
  if m <= b
    ans += m * a
    m -= m
  else
    ans += b * a
    m -= b
  end

  if m == 0
     break
  end
end
p ans