You are given a String consists of only '[', ']', '(', ')', '{', '}' these characters.
You need to find out the length of the longest subsequence which is unbalanced.
Note that:
A subsequence of a string is a new string generated from the original string with some characters (can be none) deleted without changing the relative order of the remaining characters.
A String is balanced if
Open brackets must be closed by the same type of brackets.
Open brackets must be closed in the correct order.Input Format
andled for you
Output Format
andled for you
Constraints
0<=s.length<=10^7
Notice
NA
Example
Input
{{(){{}}}}
Output
9