N,m = gets.split.map(&:to_i)
drinks = [] #値段、本数
N.times{|i|
	drinks << gets.split.map(&:to_i)
}

d = drinks.sort{|a,b| a[0] <=> b[0]}

sum = 0


while m > 0
  if d[0][1] < m
	sum += d[0][0]*d[0][1]
  else
    sum += d[0][0]*m
  end
  m -= d[0][1]
  d.delete_at(0)
end

puts sum