n, m = gets.chomp.split.map(&:to_i)

ab = []
n.times do
  ab << gets.chomp.split.map(&:to_i)
end
ab.sort!

i = 0
ans = 0

while m > 0
  if ab[i][1] < m
    m -= ab[i][1]
    ans += ab[i][0] * ab[i][1]
  else
    ans += ab[i][0] * m
    m = 0
  end
  i += 1
end

puts ans