First-principles prediction of voltages of lithiated oxides for lithium-ion batteries