  Nuclear medium effects on B$^+$ meson production are studied using the
binary-collision scaled cross section ratio between events of different
multiplicities from proton-lead collisions. Data, collected by the CMS
experiment in 2016 at a nucleon-nucleon center-of-mass energy of
$\sqrt{s_\mathrm{NN}}$ = 8.16 TeV, corresponding to an integrated luminosity of
175 nb$^{-1}$, were used. The scaling factors in the ratio are determined using
a novel approach based on the Z $\to$ $\mu^+\mu^-$ cross sections measured in
the same events. The scaled ratio for B$^+$ is consistent with unity for all
event multiplicities, putting stringent constraints on nuclear modification for
heavy flavor.
