Can we deduct improvements we made on a second home that we sold in 2016? Where do we put these expenses?

The house was originally gifted to us in 2004.  We made improvements to the home and sold it in 2016.   It was a second home for us,  not primary.