I'm working in the following exercise:
Show that $1000000! \equiv 500001 \mod 1000003$
Trying to find a way to apply Wilson's theorem I'm trying the following:
\begin{align*} 1000002! &\equiv -1 \mod 1000003!\\ 1000002\cdot1000001! &\equiv -1 \mod 1000003!\\ 1000002\cdot1000001\cdot1000000! &\equiv -1 \mod 1000003!\\ (-1)\cdot1000001\cdot1000000! &\equiv -1 \mod 1000003! \end{align*}
This is as close as I've been able to be to the exercise, I don't know what path to follow to reach that $ 500001 $, any hint or help will be greatly appreciated.