A square grid $2n \times 2n$ is constructed of matches (each match is a segment of length 1). By one move Peter can choose a vertex which (at this moment) is the endpoint of  3 or 4 matches and delete two matches whose union is a segment of length 2. Find the least possible number of matches that could remain after a number of Peter's moves.

To solve this problem, we need to determine the least possible number of matches that could remain after a number of Peter's moves on a $2n \times 2n$ grid. Each move allows Peter to choose a vertex that is the endpoint of 3 or 4 matches and delete two matches whose union is a segment of length 2.

1. **Initial Setup**:
   - The $2n \times 2n$ grid consists of $(2n+1)^2$ vertices and $4n^2$ matches.
   - Each vertex in the interior of the grid is connected to 4 matches, while each vertex on the boundary (excluding corners) is connected to 3 matches, and each corner vertex is connected to 2 matches.

2. **Strategy for Deleting Matches**:
   - Peter can delete matches in such a way that he minimizes the number of remaining matches. One effective strategy is to start by deleting matches along the boundary of the grid and then proceed to the interior.
   - By focusing on vertices with 3 or 4 matches, Peter can ensure that he maximizes the number of deletions.

3. **Boundary Deletions**:
   - Peter first deletes matches along the boundary of the grid. This involves choosing vertices on the boundary and deleting pairs of matches.
   - For a $2n \times 2n$ grid, there are $8n$ boundary vertices (excluding corners), each initially connected to 3 matches. Peter can delete 2 matches from each of these vertices.

4. **Interior Deletions**:
   - After handling the boundary, Peter moves to the interior of the grid. He can follow a zigzag pattern to ensure that he deletes as many matches as possible.
   - By carefully choosing vertices in the interior, Peter can continue to delete pairs of matches until no more deletions are possible.

5. **Calculation of Remaining Matches**:
   - Initially, there are $4n^2$ matches.
   - Each move deletes 2 matches. The number of moves Peter can make is limited by the number of vertices with 3 or 4 matches.
   - After deleting matches along the boundary and in the interior, the least possible number of remaining matches can be calculated.

6. **Final Bound**:
   - The least possible number of matches that could remain is given by the formula $2(2n-1)$.
   - This is because, after optimal deletions, the remaining matches form a minimal structure that cannot be further reduced.

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