A simplified method of ab initio calculation of electron states in relativistic magnetics. I. Ferromagnets