
Miles Reed runs the Royal Mini-Mart on land his family has owned for generations. His family once lent money to kings, but the shop is now due to be torn down so the site can become a public toilet.
His great-grandfather, who is among the dead, gives him 30 days to earn 10 million gold marks in the old kingdoms, or he stays there. The shop goes with him, with shelves of goods the people there have never seen.
Elena, the king's daughter, is ill with a fever that the physicians of Vale cannot break. Halden, the Chancellor, wants her sent to Ashford as a royal consort, and the king refuses.
Miles Reed's Royal Mini-Mart is due to be torn down, and his great-grandfather, who is among the dead, sends him and the shop to Vale with the deal. The shop lands in the palace grounds, where guards take Miles for a sorcerer when the lights come on. Vale's people soon call him a sage, and he begins selling goods to them.
Miles's first sale brings in 30,000 gold marks, paid by a note that any royal trading house will honor. Elena, the king's daughter, is still ill when her mother, the queen, comes to the shop to ask for help. Miles offers ibuprofen, which he says can bring the fever down but cannot cure everything, and Elena agrees to take it. A day later she is cooler and can sit up, and her father, the king, tells her to bring Miles an offering and ask him to win the arithmetic trial for Vale.
Elena comes to the shop to thank Miles, and she buys a calculator for 400,000 gold marks. Miles shows her how to use it for addition, subtraction, multiplication and division. Halden, the Chancellor, presses the king to send Elena to Ashford as a royal consort, since an alliance would help Vale in the trials. The king refuses, and Halden says that Ashford and the High Arbiter will put him on the throne.
Five trials will decide who leads the three kingdoms' alliance, and the first counts troops, rations and enemy strength. Ashford's side mocks Vale until Elena steps forward with the calculator. Halden's wager is set: Elena goes to Ashford as a royal consort if she loses, and Halden kneels before the sage if she wins. The calculator answers the sum of 151,314 soldiers at 28 rations each, 4,236,792 in all, before someone breaks it and it goes silent.
Yes. Miles gives her ibuprofen, and a day later she is cooler and can sit up.
Yes. After Vale wins the arithmetic trial with Miles's calculator, Halden must kneel before the sage, apologize and pay Miles 100,000 gold marks.
Because he decides Miles is a servant who stole the sage's wonders, reasoning that only a thief would know how to mend them.
Yes. In episode 19 he pays one million gold marks for the whole stock, and he calls it a gift for the High Arbiter.
Elena goes to the shop and asks Miles to mend the calculator, and he brings spare batteries along. At the palace, Halden doubts him until Miles restores the calculator in front of the court. Miles sets his price at 100,000 gold marks if the repair works, and Halden agrees to it. The calculator then answers the trial's questions, including a 45-term sequence that totals 88,650, and Vale wins the arithmetic trial.
Ashford calls the win cheating, but Halden has to kneel before the sage, apologize and pay Miles the 100,000 gold marks. Halden then calls Miles a servant and a thief who stole the sage's wonders, and has him seized. Miles answers that he is the sage, and Halden backs down when Miles is named a good friend of the king. Miles then sells his whole stock to Halden for one million gold marks, which Halden says is a gift for the High Arbiter.
Halden, now the owner of the stock, speaks of his purchase as a service to the realm. The first trial is over, and the second is set for three days later. A man from Ashford says Ashford won't lose again and that Vale's luck cannot last.
Miles Reed
The shopkeeper whose Royal Mini-Mart lands in Vale, where he sells goods to the people and is called a sage while he works toward 10 million gold marks in 30 days.
Elena
The king's daughter, whose fever Miles treats, and who later buys a calculator from him and uses it in the arithmetic trial.
Halden
The Chancellor of Vale, who wants Elena sent to Ashford, doubts Miles, and later buys his whole stock.
The king of Vale
Elena's father, who refuses to send his daughter to Ashford and backs Miles.
In the final scene, Ashford's men decide that Miles is only the sage's envoy and that the sage himself, the one in the shop, is worth courting. That puts Miles's shop and its goods at the center of a rival kingdom's plans.