The interaction between propagating microwave fields and Cooper-pair tunneling across a DC-voltage-biased Josephson junction can be highly nonlinear. We show theoretically that this nonlinearity can be used to convert an incoming single microwave photon into an outgoing n-photon Fock state in a different mode. In this process, the electrostatic energy released in a Cooper-pair tunneling event is transferred to the outgoing Fock state, providing energy gain. The created multiphoton Fock state is frequency entangled and highly bunched. The conversion can be made reflectionless (impedance matched) so that all incoming photons are converted to n-photon states. With realistic parameters, multiplication ratios n>2 can be reached. By two consecutive multiplications, the outgoing Fock-state number can get sufficiently large to accurately discriminate it from vacuum with linear postamplification and power measurement. Therefore, this amplification scheme can be used as a single-photon detector without dead time.