n, m = gets.split.map(&:to_i)
ab=$<.map{|m|m.split.map(&:to_i)}
pay = 0
ab.sort.each do |e|
    if e[0] <= m
        pay += e[0] * e[1]
        m -= e[1]
    else
        pay += m * e[0]
        break
    end
end
p pay