N, M = gets.split.map(&:to_i)

lists = []
N.times do
  lists << gets.split.map(&:to_i)
end
# p lists
lists.sort_by!{|x, y|x}
# p lists
num = M
ans = 0
lists.each do |list|
  if num >= list[1]
    num -= list[1]
    ans += list[0] * list[1]
  else
    ans += list[0] * num
    break
  end
end
puts ans
