def sum_pots(state, leftpad=10):
    """
    Sum the pots with a '#' in them, assuming that pot 0 is at index 'leftpad'.
    """
    ret = 0
    for index, symbol in enumerate(state, -leftpad):
        if symbol == '#':
            ret += index
    return ret