Lan Ruoxi, the daughter of a scholar, was abducted by bandits to Heifeng Ridge. The leader of the village, Li Yuan, asked her to be his wife in public; Lan Ruoxi delayed because she could not memorize the multiplication formula, but Li Yuan memorized it like a stream and killed her instead; she suspected that Li Yuan was not an ordinary bandit and deliberately asked tricky arithmetic questions to test, but Li Yuan solved it time and time again, but became worse and worse. Fa was curious about her; Lan Ruoxi secretly explored the cottage and found a sand table containing thousands of troops and secret letters from the court, inferring that Li Yuan's identity was not simple; the second master was jealous of Li Yuan's preferential treatment to Lan Ruoxi and devised a poisonous plan to harm her, Lan Ruoxi used the plan to find out the traitor; fragments of Li Yuan's memory emerged - he was originally the general of Zhenbei , was plotted by a powerful minister and lost his memory; Lan Ruoxi helped him stabilize the cottage, and the relationship between the two sprouted in the battle of wits; the powerful minister sent an assassin to kill him, Li Yuan was seriously injured, and Lan Ruoxi risked his life to get the medicine; Li Yuan recovered all his memories and decided to take revenge, Lan Ruoxi used arithmetic as a blade to help him crack the mechanism; the old members of the cottage gathered with the loyalists of the imperial court , Li Yuan led his troops back to the capital to expose the irrefutable evidence of the powerful officials' rebellion; during the decisive battle, Li Yuan gave up his military power, and he and Lan Ruoxi returned to the mountains to open a school, and the multiplication formula became the code word for their love.