A number of spheres with radius $ 1$ are being placed in the form of a square pyramid. First, there is a layer in the form of a square with $ n^2$ spheres. On top of that layer comes the next layer with $ (n\minus{}1)^2$ spheres, and so on. The top layer consists of only one sphere. Compute the height of the pyramid.
To find the height of the pyramid formed by spheres with radius 1, we need to consider the arrangement of the spheres in each layer and the vertical distance between the layers.

1. **Understanding the arrangement of spheres:**
   - The base layer has \( n^2 \) spheres arranged in an \( n \times n \) grid.
   - The next layer has \( (n-1)^2 \) spheres arranged in an \( (n-1) \times (n-1) \) grid.
   - This pattern continues until the top layer, which has \( 1^2 = 1 \) sphere.

2. **Calculating the vertical distance between layers:**
   - Each sphere has a radius of 1.
   - The vertical distance between the centers of spheres in adjacent layers is the diameter of a sphere, which is \( 2 \times 1 = 2 \).

3. **Summing the vertical distances:**
   - The total height of the pyramid is the sum of the vertical distances between each layer.
   - There are \( n \) layers in total.
   - The distance between the base layer and the next layer is 2 units, and this pattern continues for each subsequent layer.

4. **Height calculation:**
   - The height of the pyramid is the sum of the vertical distances between the centers of the spheres in each layer.
   - Since there are \( n \) layers, there are \( n-1 \) gaps between the layers.
   - Each gap is 2 units high.

\[
\text{Height of the pyramid} = (n-1) \times 2
\]

5. **Simplifying the expression:**
   - The height of the pyramid is given by:

\[
\text{Height} = 2(n-1)
\]

The final answer is \(\boxed{2(n-1)}\)