Bring back 30
The good wizard Thunderbard was napping happily until a loud knock woke him. Grumbling, he opened the door. There stood a worried looking King Thawmuch. The king was relieved, "Good, you're home. Only you can help me."
"What is wrong?" asked Thunderbard. Thawmuch replied, "My best horse has been stolen. The thieves will only give it back if I give them 30 jewels." "That sounds easy. Your treasure house has lots of jewels in it. I don't see the problem." said Thunderbard.
"You don't understand. The jewels are not just any old jewels. They have to come from the magical place in the Valley of Shadows. You know the place - the lake with four islands in it."
Thunderbard frowned, "Now I see why you are worried. The four islands are connected by bridges. Each bridge has jewels sitting on a pedestal in the middle of it. As you walk across a bridge, the part you just walked on vanishes. You have only enough time to pick up the jewels from the pedestal and get across to the other side. You can't swim or use a boat in the lake because its waters are full of very hungry creatures that want to eat you. You can cross the bridges from either direction except for one of them. The exception is the bridge between the island of Pots and the island of Mata. You can only go from Pots to Mata on that bridge. If you try to go the wrong way, the whole bridge will vanish as soon as you step on it. The two bridges from the mainland to the island of Gino have no jewels on them but they also vanish behind you as you walk across them."
Thawmuch pleaded, "Will you help me?"
"Of course, I will help you, my friend. I have a map of the islands. I can use it to plan my path. The clever thieves know much about the magical place. The reason they asked for 30 jewels is because that is the only total number of jewels you can take from the bridges. If you take more than 30 or less than 30, the remaining bridge to the mainland will vanish as you try to cross it on your way back. But you don't have to worry about being stranded on the islands forever. At nightfall, the creatures leave the lake to look for food on land."
Thunderbard left early next morning for the Valley of Shadows. He reached the lake by early afternoon. There he unfolded the map and planned his path for bringing back exactly 30 jewels.
