Grotto, Inc. exchanged an eight unit apartment building for a four-unit apartment building. Grotto's adjusted basis in the eight-unit building was $320,000 and its fair market value was $400,000. The four-unit building was worth $440,000 and was subject to a $40,000 mortgage, which Grotto assumed. what Grotto's basis in the four-unit building is: