Calculate the total amount (in moles) of Ca and Mg present in a sample of water that required 12.86 ml of 0.0005M EDTA solution to completely complex them.

moles = M x L.