def extract_year(paper_id: str) -> int:
    """ Tries to extract the publication year from the ArXiv paper id

    :param paper_id: original paper id
    :type paper_id: str
    :return: year, 0 if no year was found.
    :rtype: int
    """
    try:
        year = 2000 + int(paper_id[:2])
    except BaseException:
        year = 0
    return year