N,M=gets.split.map(&:to_i)
data=Hash.new{0}
N.times do 
  a,b=gets.split.map(&:to_i)
  data[a]+=b
end
money=0
as=data.keys.sort
cnt=0
as.each do |e|
  if cnt+data[e]<M
    money+=e*data[e]
    cnt+=data[e]
  else
    money+=e*(M-cnt)
    break
  end
end
puts money
  