Well being as im a dumb university student i'll chime in. I have a couple years on you though.
First of all 54 kids is going to get you in trouble. Thats a given. Second of all, if more than 5 of these people are seen walking outside of the house at a time your probably going to be reported. According to your post it was called in because 'several people were walking in and out of the house'.
Thirdly you said that once the police came you all tried packing into the house, meaning that you were outside. If you have a 54 person party outside in a residential area, your going to get fined.
Fourthly this clearly isn't a party of friends being as there are windows being broken in order to escape, if one of my friends broke a window at one of my parties on purpose he would be getting beaten to near death.
Fifthly 500 dollars is nothing. Suck it up. Life sucks then you die. Here the house owner usually gets stuck with a 5000-7500 dollar fine and then whethor or not his friends cover it is really a measure of his/her friends.
Sixthly, if the city is making 27,000 off of this party of yours (since you were kind enough to do the math) why not gather your resources and each pay approximately 10 dollars per person (5400 dollars) and get the best lawyer in the state for the 25 minutes that you will be in court and the 15 minutes he/she will spend preparing the case.
And finally, as a fellow partier and fellow university student you deserve every cent of that ticket. Complete lack of respect from everyone involved. Breaking windows, being a tough guy and getting in the cops face over why the girls got to go and not the guys when they're trying to deal with 54 underage drunk tough guys that are breaking windows trying to escape. I've had my share of tickets, and i've had my share of warnings. But theres a good reason why i get away with most of my tickets, almost every time a party gets broken up by cops, me and my friends will go up to the car and talk to them, see how the nights going, tell them about possible fights, get all the alcohol that they confiscated for free. Cops truly are your friends, they act 'prickish' and tough to show their authority, as most people that deal with them try to get into their face and take control of the situation, trust me, i just dropped out of police studies to continue my education and finish my degree in law.