HOA charges in closing costs of a rental property purchase

I purchased a property in 2018 for rental purpose. There were 2 kinds of charges related to the Homeowner's Association (HOA) in the closing costs:

1. HOA Transfer Fee

2. HOA assessments for the following 3 months

I am including item #1 as part of my Adjusted Cost Basis for this property, and item #2 as an expense item to be deducted from income of this property. Is this correct?

Thank you!