You have two options:
1- You can pray with the Imam and conclude your prayer with him and then go home and pray as many rak’ah as you wish without praying witr again s it is not permissible to pray two witr in one night.
2- When the Imam finishes witr prayer, dotn offer salam with him. You should stand up and add another rak’ah and then finish it. this way, you would have prayed only even numbers. When you go home, you can pray as many as you want and then end it with witr.
And Allah knows best