Gerald received a 33% capital and profit (loss) interest in XYZ Limited Partnership (LP). In exchange for this interest, Gerald contributed a building with a FMV of $30,000. His adjusted basis in the building was $15,000. In addition, the building was encumbered with a $9,000 nonrecourse mortgage that XYZ, LP assumed at the time the property was contributed. What is Gerald's outside basis immediately after his contribution?