7 lines
84 B
Python
7 lines
84 B
Python
|
import sys
|
||
|
|
||
|
s = sys.stdin.read()[:-1]
|
||
|
|
||
|
print(sum(map(lambda c: [-1,1][c=='('],s)))
|
||
|
|