\begin{gather*} v(0) = 1,000,000, f(0) = 1-p\\ v(1) = -\infty, f(1) = p\\ v(2) = \infty, f(2) = p\\ v(3) = 0, f(3) = 1-p \end{gather*}
in-context