Every sailing ship had to have cannon for protection. Cannon of the times required round iron cannonballs . The master wanted to store the cannonballs such that they could be of instant use when needed, yet not roll around the gun deck. The solution was to stack them up in a square-based pyramid next to the cannon. The top level of the stack had one ball, the next level down had four, the next had nine, the next had sixteen, and so on. Four levels would provide a stack of 30 cannonballs. The only real problem was how to keep the bottom level from sliding out from under the weight of the higher levels. To do this, they devised a small brass plate ("brass monkey") with one rounded indentation for each cannonball in the bottom layer. Brass was used because the cannonballs wouldn't rust to the "brass monkey", but would rust to an iron one.When temperature falls, brass contracts in size faster than iron. As it got cold on the gun decks, the indentations in the brass monkey would get smaller than the iron cannonballs they were holding. If the temperature got cold enough, the bottom layer would pop out of the indentations spilling the entire pyramid over the deck. Thus it was, quite literally, cold enough to freeze the balls off a brass monkey