Veeva Systems interview question

Given a string like this "(()())(()", Find the max length of valid string