[GCOI Round #1 C] Brackets

[GCOI Round #1 C] Brackets

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

题目描述

Mr Aoligei was playing with a string \(s\) written in the computer. The string has brackets and letters inside which he thought it was funny. He likes the string. Then, a hacker hacked his computer. The string was damaged, and he needs to find out How many pairs of brackets are in his string in order to find his string.

Note: "()" is a pair of brackets, but ")(" is not.

输入格式

Input is given from Standard Input in the following format:
\[{\large s}\]

输出格式

print the number of pairs of brackets in the string.

输入输出样例

Input #1

(o)8<))

Output #1

1

GCOI Round #1

未参加
状态
已结束
规则
OI
题目
5
开始于
2021-01-30 08:30
结束于
2021-01-30 18:45
持续时间
10.2 小时
主持人
参赛人数
6