Seventy-seven students are jammed into Lisa Zeiger's first gym class at Mastbaum High School.

The second class isn't much better - there are 71. The third goes down to 68.

Zeiger, a veteran Philadelphia teacher, calls it her "managed chaos."

Under the blue-and-red banners commemorating championship Mastbaum Panthers teams, she sets up "stations" - students shooting baskets, tossing a football, playing volleyball, but some bored, hot kids just sit on the bleachers by the end of the class.

A second adult - another Mastbaum teacher pulled from his or her preparatory period, generally - is in the room to help manage things, but "that's just so no one escapes," Zeiger said.

She's only half joking.

Classes are supposed to have no more than 33 students. But just a few weeks into a new year, Philadelphia public schools, like many around the state, are coping with the effects of a budget stalemate in Harrisburg.

City principals, teachers, and students are also dealing with the fallout from a sputtering start by the private firm hired to staff classrooms with substitute teachers.

Mastbaum's predicament illustrates perhaps the toughest convergence of these situations, but not the only one, by a long shot. The Kensington vocational school of more than 700 students has 20 oversize classes, some, like all of Zeiger's, with more than 50 students, principal W. David Bowman said.

During the spring budgeting process, Bowman lost teaching positions, forcing him to drop one of his two physical education teachers. It became clear almost immediately, though, that the situation was untenable.

Had state lawmakers passed a budget with something resembling the $159 million in new money that Gov. Wolf wants Philadelphia to receive, Mastbaum would be OK, Bowman figured - he would use some of the cash infusion to hire another gym teacher. But the deadline for a spending plan passed with no action, so for now, he cannot hire.

Before the first student reported, Bowman knew that having only one gym teacher wouldn't work out, so he put in a request for a substitute until "leveling" - the Philadelphia School District's process, executed sometime in October, to adjust for enrollment shifts.

No substitute showed up until Friday, a not-uncommon situation this school year in Philadelphia. Source4Teachers, the Cherry Hill firm awarded a $34 million contract to handle substitute service, has never filled more than 15 percent of open sub jobs, despite promising a 75 percent "fill rate" on the first day of school.

So Zeiger, a veteran gym teacher who bubbles with the sort of energy students respond to, supervises six dozens students at once.

Don't call it teaching, though, she cautions.

"I do have a complete curriculum, but I just can't do it," she said. "It's just managed chaos. It's recess, not teaching. How can you teach with 70 kids?"

Bowman, who, like many principals, skimped on books and supplies to get as many teachers as he could in classrooms, is doing what he can.

"The best news out of all this is that teachers are very patient, professional, and flexible with all this, even though they have to cover classes, or their classes are too large," he said. "And the students are doing a great job too. They're in some classrooms that are too small for all the desks."

A substitute sent Friday meant that no Mastbaum teachers had to give up their preps to help monitor Zeiger's classes. But because the teacher was not certified in physical education, the sub couldn't alleviate the overcrowding by taking half the students and instead served as the second set of eyes.

Zeiger interacts with the students easily, tossing the balls she purchased with her own money back to children when the balls sail past their intended targets, but there's only one of her, and with no help assured until the end of October - when leveling means the district would have to send another teacher - she's worried.

"It's not going to hold for very long," she said.

There are no usable locker rooms, and only three stalls in each of the boys' and girls' restrooms for changing, so Zeiger has to end class early to allow her pupils to change in shifts. One boy gave up, pulling his school uniform on over his gym clothes, explaining to Zeiger that he didn't feel like waiting in line to change.

Zeiger is livid, not because of her own heavy workload, but over the larger issues, and what she sees as the failure of officials at the School District and in Harrisburg to come through for students.

"What is the job of these people? If we didn't do our jobs, we'd all be fired," Zeiger said.

Philadelphia Federation of Teachers president Jerry Jordan, who visited Mastbaum last week, is aghast at the conditions.

"It's outrageous," he said. "It's ridiculous and unacceptable that this is allowed to happen for more than one day."

Fernando Gallard, spokesman for the Philadelphia School District, said that the Mastbaum situation was especially difficult, but that the district was doing its best.

"We are facing the challenge of schools having to budget with minimal resources," Gallard said. "And we do have a challenge in filling certain teaching positions. We still are working with about 100 vacancies districtwide."

If Harrisburg does not pass a budget soon and no substitute certified in physical education can be found, Zeiger could be managing chaos through late October.