Open shell calculations for the two- and three-electron ions