A square has been divided into $2022$ rectangles with no two of them having a common interior point. What is the maximal number of distinct lines that can be determined by the sides of these rectangles?