475. Minimize String's Cost
Given a string s consisting of lowercase English characters, '(' and ')', your task is to remove parentheses in any positions to make the resulting string valid. The cost of a string is defined as the total number of deletions required to make it valid. Minimize the cost of the string.
The first line contains a string s.
An integer representing the cost of the string.
1 <= s.length <= 10^4