1031 Exchange

I bought a property in 2001 and resided in it till 5 years ago.  5 years ago (2017), I changed it to rental. Then in February 2022, I sold the property  (did a 1031 exchange  for new rental). My question: Is my adjusted basis the value of the  house in 2001 or in 2017?  Thanks