def get_closing_parenthesis(string):
    """
    Given a string that starts with a parenthesis, e.g. (1+1)v0=0
    returns the index of the closing parenthesis of the initial parenthesis
    """
    num_parentheses_left = 0
    num_parentheses_right = 0
    for char_index in range(len(string)):
        if string[char_index] == '(':
            num_parentheses_left += 1
        elif string[char_index] == ')':
            num_parentheses_right += 1
            if num_parentheses_right == num_parentheses_left:
                return char_index