33 U.S. Code § 3004 - Strength and distribution in grade
(a) Relative rank; proportion
Of the total authorized number of officers on the lineal list of the commissioned corps, there are authorized numbers in permanent grade, in relative rank with officers of the Navy, in proportions as follows:
(b) Computation of number in grade
(1) In general
Subject to paragraph (2), whenever a final fraction occurs in computing the authorized number of officers in a grade, the nearest whole number shall be taken, and if the fraction is one-half the next higher whole number shall be taken.
(c) Preservation of grade and pay, etc.
No officer may be reduced in grade or pay or separated from the commissioned corps as the result of a computation made to determine the authorized number of officers in the various grades.
(d) Filling of vacancies; additional numbers
Nothing in this section may be construed as requiring the filling of any vacancy or as prohibiting additional numbers in any grade to compensate for vacancies existing in higher grades.