from datetime import datetime


def first_of_next_month(dte):
    """
    Return the dte of the first day of the month after the month containing the specified date,
    except when dte is the first day of the month.  In this case, just use this date.

    Argument:
        dte - the date used to determine the end of the month.
    """
    if dte.day == 1:
        return dte
    year = dte.year
    month = dte.month
    day = 1
    if month == 12:
        month = 1
        year += 1
    else:
        month += 1
    first_of_month = datetime(year, month, day)
    return first_of_month