N,M = gets.chomp.split(" ").map(&:to_i)
arr = []
N.times do |i|
  a,b = gets.chomp.split(" ").map(&:to_i)
  arr << [a,b]
end
arr = arr.sort_by{|x| x[0]}
cnt = M
i = 0
money = 0
while cnt > 0
  if cnt >= arr[i][1]
    money += arr[i][0] * arr[i][1]
    cnt -= arr[i][1]
  else
    money += arr[i][0] * cnt
    cnt = 0
  end
  i += 1
end
puts money