Determination of the axial-vector weak coupling constant with ultracold neutrons.