def getEndIndex(doc):
    """Gets the ending index of the last element of the document.

    Args:
        doc (Google Docs Document): Google Docs Document to extract text from

    Returns:
        int: endIndex of the last element of the document
    """
    return doc['body']['content'][-1]['endIndex']