Unit square ABCD is divided into two triangles, which are congruent to each other, and two trapezoids, which are also congruent to each other. These pieces are then re-assembled into rectangle PQRS, as shown below. Find the perimeter of rectangle PQRS.