\( \mathrm{Mg(NO_3)_2 \, XH_2O} \) and \( \mathrm{Ba(NO_3)_2 \, YH_2O} \) represent formula of the crystalline forms of nitrate salts. Sum of \( X \) and \( Y \) is ________.