n,m = gets.split.map &:to_i

pairs = []
n.times do |i|
  pairs[i] = gets.split.map &:to_i
end

sorted = pairs.sort{|a|a[1]}

sum = 0
sorted.each do |a,b|
  if b <= m
    sum += (b * a)
    m -= b
  else
    sum += (b * m)
    m -= m
  end
  if m == 0
    puts sum
    exit
  end
end