I was reading about the mass defect or $Q$-value in Beta Decay and the book that I was following said this, It iscalled beta minus decay as negatively charged beta particles are emitted. The rest mass energy of the initial constituents is $$U_i = [ m(X_{z}^a) -Zm_e]c^2$$
and that of the final constituents is $$U_r= [mY_{Z+1}^A-(Z+l)m_e]c^2.$$
The kinetic energy available to the product particles is,
$$Q= Ui- Ur= [m(X_{z}^a - mY_{Z+1}^A] c^2 .$$ Now I am not able to understand why was Mass of electrons subtracted in Ui as well as Uf. Any explanation would be appreciated. All the above formulas are referenced from Concepts Of Physics-HC Verma