A monovalent ion requires 1 electron for discharge, a divalent ion requires 2 electrons for discharge and so on. Thus, if  electrons flow,  atoms are discharged. 
Thus, the mass  discharged is
where 
* is the Avogadro constant;
* is the total charge, equal to the number of electrons () times the elementary charge ;
* is the Faraday constant.