N,M = gets.split.map(&:to_i)
data = []
N.times do
  data << gets.split.map(&:to_i)
end
data.sort_by!{|a| a[0]}
cnt,ans = 0,0
data.each do |a|
  if cnt + a[1] >= M
    ans += (M-cnt)*a[0]
    break
  end
  cnt += a[1]
  ans += a[0]*a[1]
end
p ans
