how the charge of an element is used to determine the chemical formula if the elements have equal and unequal charges.