464. Minimum Addition to Make Parentheses Valid
A string of parentheses is considered valid if and only if: * It is an empty string. * It can be written as AB, where A and B are valid strings. * It can be written as (A), where A is a valid string. You are given a string s consisting of parentheses. In each move, you can insert a parenthesis at any position within the string. Return the minimum number of moves required to make s a valid string.
A single line consisting of a string of parentheses.
An integer indicating the minimum number of parentheses to be added.
1 <= N <= 10^4