Exciton energy spectrum in GaAs in a magnetic field