You cut several iron bars with a laser. The bars are stacked from the bottom up, and the laser is fired straight down from above to cut them at once. The bars and the lasers satisfy the following conditions.
The figure below shows one arrangement that satisfies the conditions. The thick horizontal lines are the bars, the dots are the laser positions, and the vertical dashed arrows are the firing directions.

Such an arrangement is written out from left to right with parentheses.
(). Conversely, every () means a laser.( and its right end is a closing parenthesis ).The parenthesis string for the figure appears above the figure.
A bar breaks wherever a laser passes through it, so it falls apart into several pieces. In the example the two topmost bars break into 3 pieces and 2 pieces, and counting the rest the same way gives 17 pieces in total.
Given the parenthesis string of an arrangement, write a program that finds the total number of pieces.
The first line contains the parenthesis string of the arrangement, written with no spaces. It holds at most 100,000 parenthesis characters.
Print the total number of pieces on one line.