How many ways does the gambler break even? I got this math problem online:

A gambler starts with $\$10$ and plays a game for $20$ rounds. At each round, his wealth either increases by $\$1$ or decreases by $\$1$, but the moment his wealth falls below $\$5$, he is not allowed to play anymore. How many wealth sequences are possible in which he ends with the exact same amount $\$10$ after $20$ rounds?

Clearly, the answer has to be below $20$ choose $10$ but I haven't done much combinatorics so I don't know the answer.
 A: Consider the following diagram:
     .....Y
    .......
   ........
  .8.......
 ...7......
.....6.....
......5....
.......4...
........3..
.........2.
X.........1

A path from X to Y through non-empty cells, moving up or right, is equivalent to a trajectory the gambler's wealth can take: up means "lose a dollar", right means "win a dollar" and the empty zone at the top-left means the wealth cannot go below $5.
The path must pass through exactly one numbered cell. If that number is 1 to 6, then the path cannot possibly pass through the cut corner and the number of ways from X to Y through that number is a simple product of binomials. Indeed, it is a squared binomial since the graph is symmetric about the numbered axis.


*

*$\binom{10}{0}^2=1$

*$\binom{10}{1}^2=100$

*$\binom{10}{2}^2=2025$

*$\binom{10}{3}^2=14400$

*$\binom{10}{4}^2=44100$

*$\binom{10}{5}^2=63504$


For 7 and 8, look at this inset:
  .8..
 ...7.
abcde6
......

The number of ways to get to $abcde$ are $\binom{5}{0}, \binom{6}{1}, \binom{7}{2}, \binom{8}{3}, \binom{9}{4}=1,6,21,56,126$ respectively. Count the number of ways you can get to 7 and 8 à la Pascal's triangle, adding the numbers below and to the left:
        27  (110)
    6   27    83  (209)
1   6   21    56   126

So there are 209 ways to get from X to 7 and 110 ways to get from X to 8. By symmetry, these are also the number of ways to get from 7 or 8 to Y, so the number of paths from X to Y passing through 7 or 8 are the squares of these numbers: $209^2=43681$ and $110^2=12100$ respectively.
We have covered all possible paths, so the answer to the original question is the sum of all the numbers we have calculated: 1 + 100 + 2025 + 14400 + 44100 + 63504 + 43681 + 12100 = 179911 wealth sequences. This is indeed less than $\binom{20}{10}=184756$.
