Efficient calculation of accurate masses of isotopic peaks