n,m = gets.split(" ").map(&:to_i)
a = []
sum = []
mm = m
n.times.each do |i|
  sum = 0
  a[i] = gets.split(" ").map(&:to_i)
end
a.sort!
n.times.each do |i|
  if a[i][1] < mm
    sum += a[i][0]*a[i][1]
    mm = mm - a[i][1]
  else
    sum += a[i][0] * mm
    break
  end
end
puts sum