307 ensign and above in the line of the Navy exceeds the number of officers on the active list in the line of the Navy. (b) Sections 5442,5443, and 5444 of this title do not apply to— (1^ women officers appointed under section 5590 of this title; (2) women reserve officers, other than reserve officers in the Nurse Corps and other than reserve officers appointed under section 5581 of this title; (3) retired officers; (4) officers of the Naval Reserve and the Marine Corps Reserve assigned to active duty for training; (5) officers of the Naval Reserve and the Marine Corps Reserve ordered to active duty in connection with organizing, administering, recruiting, instructing, training, or drilling the Naval Reserve or the Marine Corps Reserve; or (6) officers of the Naval Reserve and the Marine Corps Reserve ordered to temporary active duty for the purpose of prosecuting special work. (c) Officers listed in subsection (b) are not counted as officers serving on active duty for the purpose of subsection (a) or for the purpose of sections 5442, 5443, and 5444 of this title. § 5447. Navy: line officers on the active list; permanent grade (a) The distribution in permanent grades of officers on the active list in the line of the Navy, excluding fleet admirals and officers carried as additional numbers in grade, shall be based on the following percentages of the number of such officers: (1) Rear admiral—'^%oo of 1 percent. (2) Captain—6 percent. (3) Commander—12 percent. (4) Lieutenant commander—18 percent. (5) Lieutenant—247%QO percent. (6) Lieutenant (junior grade) and ensign combined—385%Q(^ percent. (b) The Secretary of the Navy, as of January 1 of each year, shall compute the number of officers authorized under subsection (a) for each grade above lieutenant (junior grade) and for the combined grades of lieutenant (junior grade) and ensign. The number so computed is the nnmber of line officers on the active list, excluding officers carried as additional numbers in grade, prescribed for the grade or grades concerned. However, if the number of officers prescribed for the grade of captain as computed cannot be attained because of the minimum total commissioned service required for promotion to that grade by section 5780 of this title, the Secretary shall determine an appropriate lesser number. The lesser number then becomes the prescribed number for the grade of captain and the Secretary shall make a corresponding increase in the prescribed number for one or more of the lower grades. (c) Notwithstanding the provisions of subsection (a), the number of officers not restricted in the performance of duty who may hold permanent appointments on the active list in the line of the Navy in the grade of rear admiral may not exceed 150, except in time of war or national emergency.