def row_col2box(row_num, col_num):
    """
    Converts the row and column number into the corresponding box number

    :param row_num: Int
    :param col_num: Int
    :return box_num: Int
    """

    row_group_num = row_num // 3
    col_group_num = col_num // 3
    box_num = 3 * row_group_num + col_group_num

    return box_num