We present a comparative study of magnetic excitations in the first two Ruddlesden-Popper members of the Hg-family of high-temperature superconducting cuprates, which are chemically nearly identical and have the highest critical temperature ($T_mathrm{c}$) among all cuprate families. Our inelastic photon scattering experiments reveal that the two compounds paramagnon spectra are nearly identical apart from an energy scale factor of $sim130%$ that matches the ratio of $T_mathrm{c}$s, as expected in magnetic Cooper pairing theories. By relating our observations to other cuprates, we infer that the strength of magnetic interactions determines how high $T_mathrm{c}$ can reach. Our finding can be viewed as a magnetic analogue of the isotope effect, thus firmly supporting models of magnetically mediated high-temperature superconductivity.