IntermediateRating 1200
Fix the Brackets
Given a string of ( and ), print the minimum number of brackets to insert to make it balanced.
Input
One line.
Output
A number.
Sample 1
Input
())
Output
1
Sample 2
Input
(((
Output
3
Output appears hereOne line.
A number.
())
1
(((
3
Output appears here