def cc
    n,m = gets.chomp.split(/\s/).map{|x| x.to_i}

    ab = []
    for i in 1..n
        ab.push(gets.chomp.split(/\s/).map{|x| x.to_i})
    end
    ab = ab.sort{|c,d| c[0] <=> d[0]}

    pr = 0
    for i in 0..(n-1)
        a = ab[i][0]
        b = ab[i][1]
        if b >= m
            pr += a*m
            m = 0
        else
            pr += a*b
            m -= b
        end

        break if m < 0
    end

    puts pr
end

cc