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

N.times do
  data << gets.split.map(&:to_i)
end

data.sort! do |a, b|
  a[0] <=> b[0]
end

count = 0
sum = 0
data.each do |d|
  if count + d[1] > M
    sum += d[0] * (M - count)
    break
  end

  sum += d[0] * d[1]
  count += d[1]
end

puts sum