import re


def compute_score(state, zero_ind):
    """
    Compute the sum of the position of the flowers (#) in state, given that
    the 0th pot is at index zero_ind
    """
    indices = [match.start() - zero_ind for match in re.finditer("#", state)]
    return sum(indices)