1,3,5-Tris-(4-nitrophenyl)benzene is reduced with excess Sn/HCl, diazotized with excess NaNO₂/HCl at 0 °C to P, hydrolysed to Q, and brominated in water to R. The molar mass difference between Q and R is 474 g mol⁻¹. The number of heteroatoms in one molecule of R is ___.