We consider the coherent propagation of n photons in a one-dimensional coupled-resonator waveguide for n = 2, 3, 4 . . . . The scattering by a three-level atom, which resides in one of the resonators of the waveguide and gives rise to only two-photon transitions, results in a perfect quantum switch that allows either total reflection or total transmission. This is to be contrasted to the case of a single photon inside a one-dimensional resonant waveguide scattered by a two-level system with single-photon transitions where only total reflection can be accomplished; viz. the system behaves only as a perfect mirror but not as an ideal, transparent medium.