You would add the advertising expenses to your basis or value of the unit. You would thus offset part of your gain (hopefully there is a gain) using the advertising expenditure.
If you are not in the business of selling and trading real estate or in the business of renting residential units I don’t believe you can deduct the advertising expense on a regular schedule A, If you are in that business and filing a schedule C, then the expense could be deducted against income.
SRM