The county treasurer shall, within twenty days after receiving the apportionment under section 79-1044, apportion the amount as follows: (1) To each school district lying wholly or partly within any such forest reserve, an amount equal to the actual per pupil cost for each pupil actually residing in that part of the district which is within such forest reserve, but this apportionment per pupil shall not exceed the average annual cost per pupil, based on average daily attendance within that county; and (2) of the remaining amount, one-fifth to the public road fund of the county, one-fifth equally to the several school districts in the county, and the remaining three-fifths to the several school districts in the county pro rata according to the enumeration of scholars last returned by the districts. The county treasurer shall, with the approval of the county board, have authority to retain the money to be allocated under this subdivision to Class I, II, or III school districts of the county to be used for the establishment and support of a county circulating library for Class I, II, or III school districts. A school district which has failed to sustain a school taught by a legally qualified teacher for the length of time required by law shall not be entitled to receive any portion of the Forest Reserve Fund.