$\begin{array}{lll}
\text { Case I } & 5 \ldots \ldots & 0 \
\text { Case II } & 5 \ldots \ldots & \
& 5 & 1 \
& 5 & 3 \
& 6 & 0 \
& 6 & 1 \
& 6 & 2 \
& 7 & 0 \
& 7 & 1
\end{array}9 \times(8 \times 8 \times 8)=4608but50000isnotincluded,sototalnumbers4608-1=4607$