Energy spectrum of He I and H− in a strong magnetic field