nm = STDIN.gets.chomp.split(" ")
m = nm[1].to_i
data = []
STDIN.each{|x| data.push(x.chomp.split(" ").map{|y| y.to_i})}
data.sort!{|a,b| a[0] <=> b[0]}

i = 0
cost = 0
while m > 0 do
  if data[i][1] < m
    m -= data[i][1]
    cost += data[i][0] * data[i][1]
  else
    cost += data[i][0] * m
    m = 0
  end
  i += 1
end

puts cost