Question 5
C5 (RUS). In the plane we have $n$ rectangles with parallel sides. The sides of distinct rectangles lie on distinct lines. The boundaries of the rectangles cut the plane into connected regions. A region is nice if it has at least one of the vertices of the $n$ rectangles on its boundary. Prove that the sum of the numbers of the vertices of all nice regions is less than $40n$. (There can be nonconvex regions as well as regions with more than one boundary curve.)