Given a string s of '(' and ')', return the minimum number of parentheses to add (anywhere) to make the string valid (every open has a matching close and vice versa).
Input: A quoted parentheses string.
Output: Integer — minimum additions.
Input: "())"
Output: 1
Explanation: Add one '(' -> '(())'.Input: "((("
Output: 3
Explanation: Add three ')'.Input: "()"
Output: 0
Explanation: Already valid.0<=s.length<=1000s[i] in {'(',')'}