500 Hats of Bartholomew Cubbins

Bartholomew Cubbins has SO MANY HATS. Every time he removes one in the presence of the King, it is replaced magically with another. This enrages the King, who brings him to trial, and to the ultimate sentence.