A gypsy woman named Setareh, after being rejected from home, leaves her young son Ali next to a house and runs away. Farrash-bashi (School Janitor) finds Ali and takes him to his workplace, which is a busy elementary school, and takes care of him with the help of school children.
Samad burns an ogre's hair which causes an 8000 years old ogre to be released from his prison. The ogre eats a goat and also kidnapped Leila for Samad which causes her father to complain against Samad and sends him to jail but the ogre saves him and takes him to the city. There they have more adventures.