You are given a string containing only curly brackets '{' and '}'
You can perform reversals on any bracket
Reversal means '{' --> '}' or '}' --> '{'
Perform the minimum reversals so that the string becomes balanced.Input Format
A String
Output Format
An integer
Constraints
1 <= size of the string <= 100
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
}{{}}{{{
Output
3