```python
def step_value(step: str) -> int:
    if step == "+":
        return 1
    if step == "-":
        return -1
    return 0


def scan_tally(steps: list) ->