A trinitro compound, 1, 3, 5 tris-(4-nitrophenyl) benzene, on complete reaction with an excess of Sn/HCl gives major product, which on treatment with an excess of NaNO$$_2$$/HCl at 0°C provides P as the product. P, upon treatment with excess of H$$_2$$O at room temperature, gives the product Q. Bromination of Q in aqueous medium furnishes the product R. The compound P upon treatment with an excess of phenol under basic conditions gives the product S.
The molar mass difference between compounds Q and R is 474 g mol$$^{-1}$$ and between compounds P and S is 172.5 g mol$$^{-1}$$.
The total number of carbon atoms and heteroatoms present in one molecule of S is ____.
[Use: Molar mass (in g mol$$^{-1}$$): H = 1, C = 12, N = 14, O = 16, Br = 80, Cl = 35.5
Atoms other than C and H are considered as heteroatoms]