N, m = gets.chomp.split.map(&:to_i)
money = Array.new(N) { gets.chomp.split.map(&:to_i) }.sort
i = 0
ans = 0
until m <= 0
  cnt = [m, money[i][1]].min
  ans += cnt * money[i][0]
  m -= money[i][1]
  i += 1
end
puts ans
