n,m = gets.strip.split.map(&:to_i)
ary = []
n.times do
  c,d = gets.strip.split.map(&:to_i)
  ary << [c,d].to_a
end
arys = ary.sort{|a, b| a[0] <=> b[0]}
i = 0
sum = 0
nokori = m
while i >= 0 do
  nokori -= arys[i][1]
  if nokori <= 0
    sum += (arys[i][0])*(nokori+arys[i][1])
    break
  else
    sum += (arys[i][0])*(arys[i][1])
  end
  i += 1
end
puts sum