from datetime import datetime


def weekday_and_num_to_day(year: int, month: int, weekday_number: int, weekday: int):
    """Converts current year, month, weekday and weekday number into the day of month
    """
    dt_first = datetime(year, month, 1)
    dt_first_weekday = dt_first.weekday()
    return 1 - dt_first_weekday + weekday + ((0 if weekday >= dt_first_weekday else 1) + weekday_number) * 7