A poor man, driven by his weeping wife and starving children, went to the marketplace in despair. He had nothing to sell and no trade to offer. He prayed to God for help, and the prophet Elijah appeared at his side.
"Sell me," Elijah said. "Sell me in the market as your slave, and use the money to feed your family." The man recoiled in horror. To sell Elijah the Tishbite into slavery was unthinkable. But Elijah reassured him. "Only take one coin from the proceeds and return it to me. That is all I ask."
The man obeyed. Elijah was purchased by the king of that country for eighty dinars. The poor man gave one coin to Elijah, who handed it right back — and told him that from this moment on his household would flourish. The man returned home and found his fortunes reversed.
Meanwhile Elijah was brought before the king. "What can you do?" the king asked. "I am a builder," Elijah replied. The king had recently purchased slaves and construction materials for a grand new palace, and he struck a bargain: if Elijah could finish the palace in six months or less, he would be set free.
That night Elijah built the entire palace while the city slept. In the morning the king awoke to find his new palace complete and the builder vanished — Elijah had disappeared in the night. He returned to the poor man and said, "The king has profited a thousand times more from me than he paid for me. Now thank God for the mercy He has shown you."
Gaster's Exempla of the Rabbis (1924, No. 415, from Rabbi Nissim's Chibbur Yafeh me-ha-Yeshuah) preserves this as a parable of how divine rescue often works through unlikely arithmetic. The prophet allowed himself to be sold; the king thought he was getting a bargain; the poor man received a miracle; and God balanced the books in a single night of impossible construction.