C. Smiley Faces (C)
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Mr. Light is not satisfied with the number of smiley faces in his string. Now he wants to mirror exactly one substring (one or more consecutive characters in the string) to increase the number of smiley faces as possible. Can you find the maximum number of smiley faces he can achieve?

Input

The input contains a non-empty string of no more than 2 × 105 characters. Each character is either ':', '(', or ')'.

Output

Print the maximum number of smiley faces Mr. Light can achieve by mirroring exactly one substring.

Examples
Input
:(:):(:):)
Output
4
Input
:)::(:(:
Output
3