Take a right triangular prism of length 300 units, height 8 units and slant length 10 units. The prism in this case has an open base.
By Pythagoras the base length of the triangle is 6 units. The prism has 4 faces so n=4 (2 ends and 2 sides, but an open base like a roof). The area is that of these 4 faces because the base is not included.
To make the prism out of a flat sheet of material there will be some wastage but the area of the sheet will be a rectangle of area 5616 square units with width=10+8=18 units and length 300+2*6=312 units. The length 10 is used twice: the hypotenuse of the end triangles and the width of the rectangular flap which folds over to join to the base. (The wastage is reduced if the pieces of sheet that don't form the prism are used to paste, glue or weld the folded sheet into a 3-dimensional shape.)
The fake perspective diagram shows how the triangular ends are folded out into the same plane as the vertical side, while the sloping side of the prism is folded up into the same plane.