class Solution:
def maxDepth(self, s: str) -> int:
"""tc O(N) sc O(1)
ignore sign and digit, only count open paranthesis and get the max
"""
res = opens = 0
for c in s:
if c == '(':
opens += 1
res = max(res,opens)
if c == ')':
opens -= 1
return res