5.1. (16 points) A squirrel jumps once a minute to a distance of 1 along the number line, starting from point 0, and in any direction. She jumped for 40 minutes, after which she fell asleep. How many points on the number line could the squirrel have fallen asleep in?
Answer: 41.

Solution. We will solve the problem in a general form. Let the squirrel have jumped for $N$ minutes. If $N$ is even $(N=2 n)$, then after $2 n$ steps, the squirrel can only reach a point with an even coordinate in the range from $-2 n$ to $2 n$, and it can reach any of these points (to a point with coordinate $2 k$, it can jump in $2 k$ of the first minutes, and change direction each subsequent minute). From $-2 n$ to $2 n$, there are $2 n+1=N+1$ such points.

If the number of minutes is odd ( $N=2 n+1$ ), then after $2 n+1$ steps, the squirrel can only reach a point with an odd coordinate in the range from $-2 n-1$ to $2 n+1$, and it can reach any of these points (to a point with coordinate $2 k+1$, it can jump in $2 k+1$ of the first minutes, and change direction each subsequent minute). From $-2 n-1$ to $2 n+1$, there are $2 n+2=N+1$ such points.