p'=\left\{\begin{array}{ll}
2p, & p < 1/2,
\vspace{0.5em}\\
2p-1, & p\geq 1/2
\end{array}\right..