N, M = STDIN.gets.chomp.split(' ').map(&:to_i)

A = Array.new(0)

for i in 0..N - 1 do
  A[i] = STDIN.gets.chomp.split(' ').map(&:to_i) # 0が値段,1が個数
end

A.sort!{|a, b| a[0] <=> b[0]}

result = 0
nowM = M
for i in 0..N - 1 do
  if nowM <= A[i][1] then
    result += nowM * A[i][0]
    break 
  else
    result += A[i][0] * A[i][1]
    nowM -= A[i][1]
  end
end
  
puts result 