Remove the parentheses
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given a string consisting of parentheses.
Determine the minimum number of characters to be removed from this string, so that the remaining characters will form the correct bracket sequence.
Input
One line consisting of no more than 10^5
parentheses.
Output
Print the answer to the problem.
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Submissions 1K
Acceptance rate 48%