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

a = Array.new(N) {Array.new(2)}

for i in 0..N-1 do
  a[i][0], a[i][1] = gets.split.map(&:to_i)
end

#安い順にする
a.sort! { |x, y| x[0] <=> y[0] }

count = 0
ans = 0

for i in 0..N-1 do
  if count + a[i][1] < M
    count += a[i][1]
    ans += a[i][0] * a[i][1]
  else
    ans += a[i][0] * (M - count)
    break
  end
end

puts ans
