import calendar


def year_day_on_deka_date(dek_day: int, dek_month: int, dek_year: int) -> int:
    """Returns the day of the year from a Dekatrian date.
    Achronian is the day 1.
    Sinchronian is day 2 when it exists.

    Args:
        dek_day (int): Day of the month.
        dek_month (int): Month of the year.
        dek_year (int): Year.

    Return:
        int: The day of the year.
    """
    if dek_month == 0:
        return dek_day
    else:
        return (calendar.isleap(dek_year)) + 1 + (dek_month - 1) * 28 + dek_day