capital improvement from old times

Three years ago, I was gifted a mixed used property (first floor being one store front with second floor being one apartment) from my parents. It was a direct transfer/gift, I didn’t have to pay any tax and was told the property cost basis stay the same. Last year I sold the building. My parents had this property for 20 years and I only have it for 3 years. My question is can I claim all the capital improvement for the entire 23 years or just the 3 years? In other words, can the capital improvement done by my parent count to me to reduce capital gains?