16 lines
259 B
Python
16 lines
259 B
Python
n = 7000
|
|
f = 0
|
|
peb = 0
|
|
instructions = input()
|
|
ins = list(instructions)
|
|
|
|
for i in range(n):
|
|
if ins[i] == "(":
|
|
f += 1
|
|
else:
|
|
f -= 1
|
|
if f == -1:
|
|
pob = i;
|
|
break;
|
|
|
|
print(pob+1) # variables start from zero or sum shit
|