12 lines
157 B
Python
12 lines
157 B
Python
n = 7000
|
|
f = 0
|
|
instructions = input()
|
|
ins = list(instructions)
|
|
|
|
for i in range(n):
|
|
if ins[i] == "(":
|
|
f += 1
|
|
else:
|
|
f -= 1
|
|
|
|
print(f)
|