You are a chemist. Please follow the instructions to convert the structure to the corresponding name.
system
Convert the IUPAC name of a molecule (2Z)-5-bromo-2-[(2E,4E,6E)-7-(5-bromo-1,3,3-trimethylindol-1-ium-2-yl)hepta-2,4,6-trienylidene]-1,3,3-trimethylindole;perchlorate into molecular formula.
user
C29H31Br2ClN2O4
assistant