n,m=gets.chomp.split(" ").map{|s| s.to_i}
a=Array.new
ans=0
for i in 0..n-1
  a[i]=gets.chomp.split(" ").map{|s| s.to_i}
end
a.sort!
for i in 0..n-1
  if m>=a[i][1]
    ans+=a[i][0]*a[i][1]
    m-=a[i][1]
  else
    ans+=m*a[i][0]
    break
  end
end
puts ans
