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