Effect of the capture and loss of two electrons on the charge distributions of ions