def paginate_articles(articles, per_page=30):
    """Set a page number for each article"""
    current_page = 1
    i = 0
    for article in articles.values():
        if i >= per_page:
            i = 0
            current_page += 1
        article['page_number'] = current_page
        i += 1
    return current_page
