A container-manifest is written as a string using only the six bracket characters (, ), [, ], {, and }. The string is guaranteed to be a valid, properly nested balanced bracket string: every opener has a matching closer of the same kind, and openers/closers nest correctly.
The nesting depth at any point is the number of brackets currently open. Report the maximum nesting depth reached anywhere in the string.
Input format
Line 1: the bracket string.
Output format
A single integer: the maximum nesting depth.
Constraints
- 1 <= length of the string <= 100000
- The string uses only the characters ()[]{} and is a valid, properly nested balanced string.