In the given square, a diagonal is drawn, and parallel line segments joining points on the adjacent sides are drawn on both sides of the diagonal. The length of the diagonal is n√2 cm. If the distance between consecutive line segments be 1√2 cm then the sum of the lengths of all possible line segments and the diagonal is